Liferay.Loader.define("portal-workflow-kaleo-designer-web@5.0.92/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 _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={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var r=i?Object.getOwnPropertyDescriptor(e,a):null;r&&(r.get||r.set)?Object.defineProperty(n,a,r):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n("@frontend-taglib-clay$clayui/button")),a=(_interopRequireDefault(n("liferay!frontend-js-react-web$prop-types")),_interopRequireDefault(n("liferay!frontend-js-react-web$react"))),r=_interopRequireDefault(n("../../SidebarPanel")),o=_interopRequireDefault(n("./select-action/ActionTypeAction")),c=_interopRequireDefault(n("./select-action/ActionTypeNotification")),l=_interopRequireDefault(n("./select-action/ActionTypeReassignment")),s=_interopRequireDefault(n("./select-action/SelectActionType"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return e},e}const e={reassignments:l.default,timerActions:o.default,timerNotifications:c.default};var _default=({actionData:t,actionSectionsIndex:n,reassignments:o,sectionsLength:c,setActionSections:l,setContentName:u,setErrors:d,timersIndex:f})=>{const p=e[t.actionType];return a.default.createElement(r.default,{panelTitle:Liferay.Language.get("action")},a.default.createElement(s.default,{actionSectionsIndex:n,actionType:t.actionType,reassignments:o,setActionSections:l,timersIndex:f}),a.default.createElement(p,{actionData:t,actionSectionsIndex:n,actionType:t.actionType,key:"section-".concat(t.identifier),sectionsLength:c,setActionSections:l,setContentName:u,setErrors:d,timersIndex:f}),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:()=>l((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 l((t=>t.filter((t=>t.identifier!==e))));var e},symbol:"trash"}))))};t.default=_default}}));
//# sourceMappingURL=TimerAction.js.map