Liferay.Loader.define("@liferay/object-web@1.0.108/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){var r;window;{Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultSortScreen=function(){const[{objectView:{objectViewSortColumns:e}},t]=(0,u.useViewContext)(),[a,r]=(0,i.useState)(!1),[f,c]=(0,i.useState)(!1),[s,g]=(0,i.useState)(""),{observer:y,onClose:b}=(0,o.useModal)({onClose:()=>r(!1)});return(0,i.useEffect)((()=>{!1===a&&c(!1)}),[a]),i.default.createElement(i.default.Fragment,null,i.default.createElement(n.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")),i.default.createElement(l.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:u.TYPES.CHANGE_OBJECT_VIEW_SORT_COLUMN_ORDER})},onDeleteColumn:e=>{t({payload:{objectFieldName:e},type:u.TYPES.DELETE_OBJECT_VIEW_SORT_COLUMN})},onEditing:c,onEditingObjectFieldName:g,onVisibleEditModal:r,openModal:()=>r(!0),secondColumnHeader:Liferay.Language.get("sorting"),title:Liferay.Language.get("default-sort")}),a&&i.default.createElement(d.ModalAddDefaultSortColumn,{editingObjectFieldName:s,header:f?Liferay.Language.get("edit-default-sort"):Liferay.Language.get("new-default-sort"),isEditingSort:f,observer:y,onClose:b}))};var n=(r=a("@frontend-taglib-clay$clayui/alert"))&&r.__esModule?r:{default:r},o=a("@frontend-taglib-clay$clayui/modal"),l=a("@liferay/object-js-components-web"),i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();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")),d=a("../ModalAddDefaultSortColumn/ModalAddDefaultSortColumn"),u=a("../objectViewContext");function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}}}));
//# sourceMappingURL=DefaultSortScreen.js.map