Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.141/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)(u.default),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),R=(0,a.useCallback)(((e,t)=>{(0,c.default)({configuration:S.configuration,dispatch:m,fragmentEntryLink:S,languageId:_,name:e,value:t})}),[m,S,_]);return a.default.createElement(a.default.Fragment,null,y===i.VIEWPORT_SIZES.desktop&&v.map(((e,t)=>a.default.createElement("div",{className:"mb-1",key:t},a.default.createElement(d.FieldSet,{fields:e.fields,isCustomStylesFieldSet:!0,label:e.label,languageId:_,onValueSelect:R,values:(0,s.default)(S)})))),a.default.createElement(f.CommonStyles,{commonStylesValues:C.styles,item:e,role:r.COMMON_STYLES_ROLES.general}))};_interopRequireDefault(n("liferay!frontend-js-react-web$prop-types"));var a=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={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var o=a?Object.getOwnPropertyDescriptor(e,r):null;o&&(o.get||o.set)?Object.defineProperty(n,r,o):n[r]=e[r]}n.default=e,t&&t.set(e,n);return n}(n("liferay!frontend-js-react-web$react")),r=n("../../../../../../app/config/constants/commonStylesRoles"),o=n("../../../../../../app/config/constants/fragmentEntryTypes"),i=n("../../../../../../app/config/constants/viewportSizes"),l=n("../../../../../../app/contexts/StoreContext"),u=_interopRequireDefault(n("../../../../../../app/selectors/selectLanguageId")),s=_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