Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.132/page_editor/app/thunks/addFragment",["module","exports","require","../actions/addFragmentEntryLinks","../config/constants/fragmentEntryTypes","../services/FragmentService"],(function(e,t,n){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function({fragmentEntryKey:e,groupId:t,parentItemId:n,position:o,selectItem:i=(()=>{}),type:s}){return(m,u)=>{const y={fragmentEntryKey:e,groupId:t,onNetworkStatus:m,parentItemId:n,position:o,segmentsExperienceId:u().segmentsExperienceId,type:s},g=(e,t,n)=>{m((0,a.default)({addedItemId:n,fragmentEntryLinks:e,layoutData:t})),i(n)};s===r.FRAGMENT_ENTRY_TYPES.composition?d.default.addFragmentEntryLinks(y).then((({addedItemId:e,fragmentEntryLinks:t,layoutData:n})=>{g(Object.values(t),n,e)})):d.default.addFragmentEntryLink(y).then((({addedItemId:e,fragmentEntryLink:t,layoutData:n})=>{g([t],n,e)}))}};var a=o(n("../actions/addFragmentEntryLinks")),r=n("../config/constants/fragmentEntryTypes"),d=o(n("../services/FragmentService"));function o(e){return e&&e.__esModule?e:{default:e}}}}));
//# sourceMappingURL=addFragment.js.map