Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.169/page_editor/plugins/browser/components/page_structure/components/item_configuration_panels/FormMappingOptions",["module","exports","require","liferay!frontend-js-react-web$react","../../../../../../app/components/fragment_configuration_fields/SelectField","../../../../../../app/config/constants/formMappingSources","../../../../../../app/config/index"],(function(e,a,n){window;Object.defineProperty(a,"__esModule",{value:!0}),a.default=function FormMappingOptions({hideLabel:e=!1,item:a,onValueSelect:n}){var u,r;const s=[{label:Liferay.Language.get("none"),value:"0"},...Liferay.FeatureFlags["LPS-169923"]?i.config.formTypes.filter((e=>!(null==e?void 0:e.isRestricted))):i.config.formTypes],{classNameId:d,classTypeId:p}=a.config,c=s.find((({value:e})=>e===d)),f=null==c||null===(u=c.subtypes)||void 0===u?void 0:u.find((({value:e})=>e===p));return l.default.createElement(l.default.Fragment,null,l.default.createElement(t.SelectField,{field:{hideLabel:e,label:Liferay.Language.get("content-type"),name:"classNameId",typeOptions:{validValues:s.map((({label:e,value:a})=>({label:e,value:a})))}},onValueSelect:(e,a)=>{var l,t;const i=s.find((({value:e})=>e===a));return n({classNameId:a,classTypeId:(null==i||null===(l=i.subtypes)||void 0===l||null===(t=l[0])||void 0===t?void 0:t.value)||"0",formConfig:o.FORM_MAPPING_SOURCES.otherContentType})},value:c.value}),(null==c||null===(r=c.subtypes)||void 0===r?void 0:r.length)>0&&l.default.createElement(t.SelectField,{field:{hideLabel:e,label:Liferay.Language.get("subtype"),name:"classTypeId",typeOptions:{validValues:[{label:Liferay.Language.get("none"),value:""},...c.subtypes]}},onValueSelect:(e,l)=>n({classNameId:a.config.classNameId,classTypeId:l,formConfig:o.FORM_MAPPING_SOURCES.otherContentType}),value:f?p:""}))};var l=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(n("liferay!frontend-js-react-web$react")),t=n("../../../../../../app/components/fragment_configuration_fields/SelectField"),o=n("../../../../../../app/config/constants/formMappingSources"),i=n("../../../../../../app/config/index")}));
//# sourceMappingURL=FormMappingOptions.js.map