Liferay.Loader.define("asset-list-web@3.0.88/js/components/VariationsNav/index",["module","exports","require","@frontend-taglib-clay$clayui/button","@frontend-taglib-clay$clayui/empty-state","@frontend-taglib-clay$clayui/tooltip","liferay!frontend-js-react-web$prop-types","liferay!frontend-js-react-web$react","./SortableList"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=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 i=r?Object.getOwnPropertyDescriptor(e,n):null;i&&(i.get||i.set)?Object.defineProperty(a,n,i):a[n]=e[n]}a.default=e,t&&t.set(e,a);return a}(a("@frontend-taglib-clay$clayui/button")),n=_interopRequireDefault(a("@frontend-taglib-clay$clayui/empty-state")),i=a("@frontend-taglib-clay$clayui/tooltip"),l=(_interopRequireDefault(a("liferay!frontend-js-react-web$prop-types")),_interopRequireDefault(a("liferay!frontend-js-react-web$react"))),o=_interopRequireDefault(a("./SortableList"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return e},e}var _default=({assetListEntrySegmentsEntryRels:e,assetListEntryValid:t,openSelectSegmentsEntryDialogMethod:a,portletNamespace:u,segmentsEntriesAvailables:d,updateVariationsPriorityURL:s})=>{const f={default:e.length>1,emptyState:1===e.length,showDefaultStateHeaderAddVariationButton(){return this.default&&t&&d},showEmptyStateAddVariationButton(){return this.emptyState&&t&&d}},handleAddVariation=()=>{const e=window[a];"function"==typeof e&&e()};return l.default.createElement(l.default.Fragment,null,l.default.createElement("div",{className:"align-items-center d-flex justify-content-between mb-3"},l.default.createElement("p",{className:"font-weight-semi-bold h5 mb-0 text-uppercase"},Liferay.Language.get("personalized-variations")),f.showDefaultStateHeaderAddVariationButton()&&l.default.createElement(i.ClayTooltipProvider,null,l.default.createElement(r.ClayButtonWithIcon,{"data-tooltip-align":"top",displayType:"unstyled",onClick:handleAddVariation,size:"sm",symbol:"plus",title:Liferay.Language.get("create-variation")}))),f.emptyState&&l.default.createElement(n.default,{description:Liferay.Language.get("no-personalized-variations-were-found"),title:Liferay.Language.get("no-personalized-variations-yet")},f.showEmptyStateAddVariationButton()&&l.default.createElement(r.default,{displayType:"primary",onClick:handleAddVariation,size:"sm"},Liferay.Language.get("add-personalized-variation"))),f.default&&l.default.createElement(l.default.Fragment,null,l.default.createElement("p",{className:"mb-3 small text-secondary"},Liferay.Language.get("create-personalized-variations-of-the-collections-for-different-segments")),l.default.createElement(o.default,{items:e,namespace:u,savePriorityURL:s})))};t.default=_default}}));
//# sourceMappingURL=index.js.map