Liferay.Loader.define("@liferay/object-web@1.0.181/js/components/ObjectView/DefaultSortScreen/DefaultSortScreen",["module","exports","require","@frontend-taglib-clay$clayui/alert","@frontend-taglib-clay$clayui/modal","@liferay/object-js-components-web","liferay!frontend-js-react-web$react","../ModalAddDefaultSortColumn/ModalAddDefaultSortColumn","../objectViewContext"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultSortScreen=function DefaultSortScreen(){const[{objectView:{objectViewSortColumns:e}},t]=(0,d.useViewContext)(),[a,u]=(0,l.useState)(!1),[f,c]=(0,l.useState)(!1),[s,g]=(0,l.useState)(""),{observer:y,onClose:b}=(0,n.useModal)({onClose:()=>u(!1)});return(0,l.useEffect)((()=>{!1===a&&c(!1)}),[a]),l.default.createElement(l.default.Fragment,null,l.default.createElement(r.default,{className:"lfr-objects__side-panel-content-container",displayType:"info",title:"".concat(Liferay.Language.get("info"),":")},Liferay.Language.get("the-hierarchy-of-the-default-sorting-will-be-defined-by-the-vertical-order-of-the-fields")),l.default.createElement(o.BuilderScreen,{defaultSort:!0,emptyState:{buttonText:Liferay.Language.get("new-default-sort"),description:Liferay.Language.get("start-creating-a-sort-to-display-specific-data"),title:Liferay.Language.get("no-default-sort-was-created-yet")},firstColumnHeader:Liferay.Language.get("name"),hasDragAndDrop:!0,objectColumns:null!=e?e:[],onChangeColumnOrder:(e,a)=>{t({payload:{draggedIndex:e,targetIndex:a},type:d.TYPES.CHANGE_OBJECT_VIEW_SORT_COLUMN_ORDER})},onDeleteColumn:e=>{t({payload:{objectFieldName:e},type:d.TYPES.DELETE_OBJECT_VIEW_SORT_COLUMN})},onEditing:c,onEditingObjectFieldName:g,onVisibleEditModal:u,openModal:()=>u(!0),secondColumnHeader:Liferay.Language.get("sorting"),title:Liferay.Language.get("default-sort")}),a&&l.default.createElement(i.ModalAddDefaultSortColumn,{editingObjectFieldName:s,header:f?Liferay.Language.get("edit-default-sort"):Liferay.Language.get("new-default-sort"),isEditingSort:f,observer:y,onClose:b}))};var r=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(a("@frontend-taglib-clay$clayui/alert")),n=a("@frontend-taglib-clay$clayui/modal"),o=a("@liferay/object-js-components-web"),l=function _interopRequireWildcard(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache();if(t&&t.has(e))return t.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var o=r?Object.getOwnPropertyDescriptor(e,n):null;o&&(o.get||o.set)?Object.defineProperty(a,n,o):a[n]=e[n]}a.default=e,t&&t.set(e,a);return a}(a("liferay!frontend-js-react-web$react")),i=a("../ModalAddDefaultSortColumn/ModalAddDefaultSortColumn"),d=a("../objectViewContext");function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return e},e}}}));
//# sourceMappingURL=DefaultSortScreen.js.map