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