Liferay.Loader.define("asset-list-web@3.0.88/js/components/VariationsNav/SortableListItemMoreActions",["module","exports","require","@frontend-taglib-clay$clayui/button","@frontend-taglib-clay$clayui/drop-down","liferay!frontend-js-react-web$classnames","frontend-js-web","liferay!frontend-js-react-web$prop-types","liferay!frontend-js-react-web$react","./DropDownItem"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r("@frontend-taglib-clay$clayui/button"),n=_interopRequireDefault(r("@frontend-taglib-clay$clayui/drop-down")),i=_interopRequireDefault(r("liferay!frontend-js-react-web$classnames")),o=r("frontend-js-web"),l=(_interopRequireDefault(r("liferay!frontend-js-react-web$prop-types")),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 r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var i=a?Object.getOwnPropertyDescriptor(e,n):null;i&&(i.get||i.set)?Object.defineProperty(r,n,i):r[n]=e[n]}r.default=e,t&&t.set(e,r);return r}(r("liferay!frontend-js-react-web$react"))),s=_interopRequireDefault(r("./DropDownItem"));function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return e},e}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var _default=({index:e,itemIsDeleteable:t,onDeleteVariation:r,onReorder:c,sortableListItemName:d,totalItems:u})=>{const[f,p]=(0,l.useState)(!1),y=[{cssClasses:"pl-3 py-1",direction:-1,disabled:!e,icon:"angle-up",text:Liferay.Language.get("prioritize")},{cssClasses:"pl-3 py-1",direction:1,disabled:e+1===u,icon:"angle-down",text:Liferay.Language.get("deprioritize")},{cssClasses:"border-top pl-3 py-1",deleteAction:!0,disabled:!t,icon:"trash",text:Liferay.Language.get("delete")}],handleClick=({deleteAction:e,direction:t,index:a})=>{e?r():c({direction:t,index:a})};return l.default.createElement(n.default,{active:f,className:"more-actions",onActiveChange:p,trigger:l.default.createElement(a.ClayButtonWithIcon,{"aria-label":(0,o.sub)(Liferay.Language.get("actions-for-x"),d),className:(0,i.default)("more-actions__button",{"more-actions__button--active":f}),displayType:"unstyled",symbol:"ellipsis-v"})},l.default.createElement(n.default.ItemList,null,y.map((({cssClasses:t,deleteAction:r,direction:a,disabled:n,icon:i,text:o})=>l.default.createElement(s.default,{cssClasses:t,deleteAction:r,direction:a,disabled:n,icon:i,index:e,key:o,onClick:handleClick,text:o})))))};t.default=_default}}));
//# sourceMappingURL=SortableListItemMoreActions.js.map