Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.179/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 ListItemStyleSelector({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(ListItemStylesOptions,{item:n,listItemStyles:e})))};var a=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 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=(_interopRequireDefault(l("liferay!frontend-js-react-web$prop-types")),_interopRequireDefault(l("liferay!frontend-js-react-web$react")));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}function ListItemStylesOptions({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