Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.132/page_editor/plugins/browser/components/page-structure/components/item-configuration-panels/collection-general-panel/ListItemStyleSelector",["module","exports","require","@frontend-taglib-clay$clayui/form","liferay!frontend-js-react-web$prop-types","liferay!frontend-js-react-web$react"],(function(e,t,l){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.ListItemStyleSelector=function({availableListItemStyles:e,collectionListItemStyleId:t,handleConfigurationChanged:l,item:n}){return r.default.createElement(a.default.Group,{small:!0},r.default.createElement("label",{htmlFor:t},Liferay.Language.get("list-item-style")),r.default.createElement(a.ClaySelect,{"aria-label":Liferay.Language.get("list-item-style"),id:t,onChange:({target:e})=>{const t=e.options;l({listItemStyle:t[e.selectedIndex].dataset.key,templateKey:t[e.selectedIndex].dataset.templateKey})}},r.default.createElement(i,{item:n,listItemStyles:e})))};var a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=o();if(t&&t.has(e))return t.get(e);var l={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=a?Object.getOwnPropertyDescriptor(e,r):null;n&&(n.get||n.set)?Object.defineProperty(l,r,n):l[r]=e[r]}l.default=e,t&&t.set(e,l);return l}(l("@frontend-taglib-clay$clayui/form")),r=(n(l("liferay!frontend-js-react-web$prop-types")),n(l("liferay!frontend-js-react-web$react")));function n(e){return e&&e.__esModule?e:{default:e}}function o(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}function i({item:e,listItemStyles:t}){return t.map((t=>t.templates?r.default.createElement(a.ClaySelect.OptGroup,{key:t.label,label:t.label},t.templates.map((t=>r.default.createElement(a.ClaySelect.Option,{"data-key":t.key,"data-template-key":t.templateKey,key:"".concat(t.key,"_").concat(t.templateKey),label:t.label,selected:e.config.listItemStyle===t.key&&(!e.config.templateKey||e.config.templateKey===t.templateKey)})))):r.default.createElement(a.ClaySelect.Option,{"data-key":t.key,key:t.label,label:t.label,selected:e.config.listItemStyle===t.key})))}}}));
//# sourceMappingURL=ListItemStyleSelector.js.map