Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.132/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){var l;window;Object.defineProperty(a,"__esModule",{value:!0}),a.default=function({hideLabel:e=!1,item:a,onValueSelect:n}){var l,u;const r=[{label:Liferay.Language.get("none"),value:"0"},...s.config.formTypes],{classNameId:d,classTypeId:c}=a.config,p=r.find((({value:e})=>e===d)),f=null==p||null===(l=p.subtypes)||void 0===l?void 0:l.find((({value:e})=>e===c));return t.default.createElement(t.default.Fragment,null,t.default.createElement(o.SelectField,{field:{hideLabel:e,label:Liferay.Language.get("content-type"),name:"classNameId",typeOptions:{validValues:r}},onValueSelect:(e,a)=>{var l,t;const o=r.find((({value:e})=>e===a));return n({classNameId:a,classTypeId:(null==o||null===(l=o.subtypes)||void 0===l||null===(t=l[0])||void 0===t?void 0:t.value)||"0",formConfig:i.FORM_MAPPING_SOURCES.otherContentType})},value:p.value}),(null==p||null===(u=p.subtypes)||void 0===u?void 0:u.length)>0&&t.default.createElement(o.SelectField,{field:{hideLabel:e,label:Liferay.Language.get("subtype"),name:"classTypeId",typeOptions:{validValues:[{label:Liferay.Language.get("none"),value:""},...p.subtypes]}},onValueSelect:(e,l)=>n({classNameId:a.config.classNameId,classTypeId:l,formConfig:i.FORM_MAPPING_SOURCES.otherContentType}),value:f?c:""}))};var t=(l=n("liferay!frontend-js-react-web$react"))&&l.__esModule?l:{default:l},o=n("../../../../../../app/components/fragment-configuration-fields/SelectField"),i=n("../../../../../../app/config/constants/formMappingSources"),s=n("../../../../../../app/config/index")}));
//# sourceMappingURL=FormMappingOptions.js.map