Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.132/page_editor/plugins/experience/components/ExperiencesList",["module","exports","require","@frontend-taglib-clay$clayui/list","liferay!frontend-js-react-web$prop-types","liferay!frontend-js-react-web$react","../../../app/contexts/StoreContext","../thunks/selectExperience","../types","./ExperienceItem"],(function(e,t,n){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=s(n("@frontend-taglib-clay$clayui/list")),i=(s(n("liferay!frontend-js-react-web$prop-types")),s(n("liferay!frontend-js-react-web$react"))),c=n("../../../app/contexts/StoreContext"),a=s(n("../thunks/selectExperience")),o=(n("../types"),s(n("./ExperienceItem")));function s(e){return e&&e.__esModule?e:{default:e}}var p=({activeExperienceId:e,canUpdateExperiences:t,defaultExperienceId:n,experiences:s,onDeleteExperience:p,onDuplicateExperience:d,onEditExperience:l,onPriorityDecrease:u,onPriorityIncrease:x})=>{const y=(0,c.useDispatch)(),E=e=>y((0,a.default)({id:e}));return i.default.createElement(r.default,{className:"mt-3"},s.map(((r,c)=>{const a=r.segmentsExperienceId===e,y=s.length-1===c,f=0===c||((e,t)=>s[t-1].hasLockedSegmentsExperiment&&(e.segmentsEntryId===s[t-1].segmentsEntryId||"0"===e.segmentsEntryId))(r,c),m=t&&r.segmentsExperienceId!==n&&!r.hasLockedSegmentsExperiment;return i.default.createElement(o.default,{active:a,editable:m,experience:r,key:r.segmentsExperienceId,lockedDecreasePriority:y,lockedIncreasePriority:f,onDeleteExperience:p,onDuplicateExperience:d,onEditExperience:l,onPriorityDecrease:u,onPriorityIncrease:x,onSelect:E})})))};t.default=p}}));
//# sourceMappingURL=ExperiencesList.js.map