Liferay.Loader.define("portal-workflow-kaleo-designer-web@5.0.83/designer/js/definition-builder/diagram-builder/components/sidebar/sections/timers/TimerAction",["module","exports","require","@frontend-taglib-clay$clayui/button","liferay!frontend-js-react-web$prop-types","liferay!frontend-js-react-web$react","../../SidebarPanel","./select-action/ActionTypeAction","./select-action/ActionTypeNotification","./select-action/ActionTypeReassignment","./select-action/SelectActionType"],(function(e,t,n){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=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={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=i?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n("@frontend-taglib-clay$clayui/button")),a=(f(n("liferay!frontend-js-react-web$prop-types")),f(n("liferay!frontend-js-react-web$react"))),o=f(n("../../SidebarPanel")),r=f(n("./select-action/ActionTypeAction")),c=f(n("./select-action/ActionTypeNotification")),s=f(n("./select-action/ActionTypeReassignment")),l=f(n("./select-action/SelectActionType"));function f(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}const e={reassignments:s.default,timerActions:r.default,timerNotifications:c.default};var u=({actionData:t,actionSectionsIndex:n,reassignments:r,sectionsLength:c,setActionSections:s,setContentName:f,setErrors:d,timersIndex:u})=>{const y=e[t.actionType];return a.default.createElement(o.default,{panelTitle:Liferay.Language.get("action")},a.default.createElement(l.default,{actionSectionsIndex:n,actionType:t.actionType,reassignments:r,setActionSections:s,timersIndex:u}),a.default.createElement(y,{actionData:t,actionSectionsIndex:n,actionType:t.actionType,key:"section-".concat(t.identifier),sectionsLength:c,setActionSections:s,setContentName:f,setErrors:d,timersIndex:u}),a.default.createElement("div",{className:"autofit-float autofit-padded-no-gutters-x autofit-row autofit-row-center mb-3"},a.default.createElement("div",{className:"autofit-col"},a.default.createElement(i.default,{className:"mr-3",displayType:"secondary",onClick:()=>s((e=>(e=>[...e,{actionType:"timerActions",identifier:"".concat(Date.now(),"-").concat(e.length)}])(e)))},Liferay.Language.get("new-action"))),a.default.createElement("div",{className:"autofit-col autofit-col-end"},c>1&&a.default.createElement(i.ClayButtonWithIcon,{className:"delete-button",displayType:"unstyled",onClick:()=>{return e=t.identifier,void s((t=>t.filter((t=>t.identifier!==e))));var e},symbol:"trash"}))))};t.default=u}}));
//# sourceMappingURL=TimerAction.js.map