Liferay.Loader.define("fragment-web@4.0.73/js/fragment-editor/FieldTypeSelector",["module","exports","require","@frontend-taglib-clay$clayui/alert","@frontend-taglib-clay$clayui/form","liferay!frontend-js-react-web$classnames","liferay!frontend-js-react-web$react"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.FieldTypeSelector=function FieldTypeSelector({availableFieldTypes:e,description:t,fieldTypes:a,onChangeFieldTypes:c,portletNamespace:f,readOnly:u,small:d,title:o}){return i.default.createElement(l.default.Group,{className:(0,n.default)({"form-group-sm":d})},i.default.createElement("div",{className:"sheet-section"},i.default.createElement("h2",{className:"sheet-subtitle"},o),u?a.length?a.map((t=>{const a=e.find((({key:e})=>e===t)).label;return i.default.createElement("p",{className:"mb-1",key:t},a)})):i.default.createElement(r.default,{displayType:"info"},Liferay.Language.get("no-field-type-is-defined-for-this-fragment")):i.default.createElement(i.default.Fragment,null,i.default.createElement("p",null,t),e.map((({key:e,label:t})=>i.default.createElement(l.ClayCheckbox,{"aria-label":t,checked:a.includes(e),disabled:a.includes("captcha")&&"captcha"!==e,key:e,label:t,name:"".concat(f,"fieldTypes"),onChange:t=>((e,t)=>{if("captcha"===e&&t)return void c([e]);const r=a.filter((t=>t!==e));c(t?[...r,e]:r)})(e,t.target.checked),value:e}))))))};var r=_interopRequireDefault(a("@frontend-taglib-clay$clayui/alert")),l=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 l in e)if(Object.prototype.hasOwnProperty.call(e,l)){var n=r?Object.getOwnPropertyDescriptor(e,l):null;n&&(n.get||n.set)?Object.defineProperty(a,l,n):a[l]=e[l]}a.default=e,t&&t.set(e,a);return a}(a("@frontend-taglib-clay$clayui/form")),n=_interopRequireDefault(a("liferay!frontend-js-react-web$classnames")),i=_interopRequireDefault(a("liferay!frontend-js-react-web$react"));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}}}}));
//# sourceMappingURL=FieldTypeSelector.js.map