Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.156/page_editor/plugins/browser/components/page_structure/components/item_configuration_panels/FragmentGeneralPanel",["module","exports","require","liferay!frontend-js-react-web$prop-types","liferay!frontend-js-react-web$react","../../../../../../app/config/constants/commonStylesRoles","../../../../../../app/config/constants/fragmentEntryTypes","../../../../../../app/config/constants/viewportSizes","../../../../../../app/contexts/StoreContext","../../../../../../app/selectors/selectLanguageId","../../../../../../app/utils/getFragmentConfigurationValues","../../../../../../app/utils/getResponsiveConfig","../../../../../../app/utils/updateConfigurationValue","../../../../../../prop_types/index","./CommonStyles","./FieldSet"],(function(e,t,n){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.FragmentGeneralPanel=function FragmentGeneralPanel({item:e}){var t,n,g;const m=(0,l.useDispatch)(),y=(0,l.useSelector)((e=>e.selectedViewportSize)),S=(0,l.useSelectorCallback)((t=>t.fragmentEntryLinks[e.config.fragmentEntryLinkId]),[e.config.fragmentEntryLinkId]),_=(0,l.useSelector)(s.default),R=(0,l.useSelectorRef)((e=>e.fragmentEntryLinks)),v=null!==(t=null===(n=S.configuration)||void 0===n||null===(g=n.fieldSets)||void 0===g?void 0:g.filter((({configurationRole:e,label:t})=>!(e||S.fragmentEntryType===o.FRAGMENT_ENTRY_TYPES.input&&!t))))&&void 0!==t?t:[],C=(0,p.getResponsiveConfig)(e.config,y),E=(0,r.useCallback)(((e,t)=>{(0,c.default)({configuration:S.configuration,dispatch:m,fragmentEntryLink:S,languageId:_,name:e,value:t})}),[m,S,_]);return r.default.createElement(r.default.Fragment,null,y===i.VIEWPORT_SIZES.desktop&&v.map(((e,t)=>r.default.createElement("div",{className:"mb-1",key:t},r.default.createElement(d.FieldSet,{description:e.description,fields:e.fields,fragmentEntryLinks:R.current,isCustomStylesFieldSet:!0,label:e.label,languageId:_,onValueSelect:E,selectedViewportSize:y,values:(0,u.default)(S)})))),r.default.createElement(f.CommonStyles,{commonStylesValues:C.styles,item:e,role:a.COMMON_STYLES_ROLES.general}))};_interopRequireDefault(n("liferay!frontend-js-react-web$prop-types"));var r=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 n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n("liferay!frontend-js-react-web$react")),a=n("../../../../../../app/config/constants/commonStylesRoles"),o=n("../../../../../../app/config/constants/fragmentEntryTypes"),i=n("../../../../../../app/config/constants/viewportSizes"),l=n("../../../../../../app/contexts/StoreContext"),s=_interopRequireDefault(n("../../../../../../app/selectors/selectLanguageId")),u=_interopRequireDefault(n("../../../../../../app/utils/getFragmentConfigurationValues")),p=n("../../../../../../app/utils/getResponsiveConfig"),c=_interopRequireDefault(n("../../../../../../app/utils/updateConfigurationValue")),f=(n("../../../../../../prop_types/index"),n("./CommonStyles")),d=n("./FieldSet");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=FragmentGeneralPanel.js.map