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