403Webshell
Server IP : 35.80.110.71  /  Your IP : 216.73.216.221
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux ip-172-31-21-44 6.17.0-1019-aws #19~24.04.1-Ubuntu SMP Tue Jun 23 18:53:06 UTC 2026 x86_64
User : ubuntu ( 1000)
PHP Version : 8.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/elite-events-storybook/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/elite-events-storybook/9258.1d450bde.iframe.bundle.js
"use strict";(self.webpackChunkelite_events_nextjs=self.webpackChunkelite_events_nextjs||[]).push([[9258],{"./node_modules/msw/lib/core/delay.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{cb:()=>delay});var is_node_process__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/is-node-process/lib/index.mjs");const SET_TIMEOUT_MAX_ALLOWED_INT=2147483647,MIN_SERVER_RESPONSE_TIME=100,MAX_SERVER_RESPONSE_TIME=400,NODE_SERVER_RESPONSE_TIME=5;function getRealisticResponseTime(){return(0,is_node_process__WEBPACK_IMPORTED_MODULE_0__.S)()?NODE_SERVER_RESPONSE_TIME:Math.floor(Math.random()*(MAX_SERVER_RESPONSE_TIME-MIN_SERVER_RESPONSE_TIME)+MIN_SERVER_RESPONSE_TIME)}async function delay(durationOrMode){let delayTime;if("string"==typeof durationOrMode)switch(durationOrMode){case"infinite":delayTime=SET_TIMEOUT_MAX_ALLOWED_INT;break;case"real":delayTime=getRealisticResponseTime();break;default:throw new Error(`Failed to delay a response: unknown delay mode "${durationOrMode}". Please make sure you provide one of the supported modes ("real", "infinite") or a number.`)}else if(void 0===durationOrMode)delayTime=getRealisticResponseTime();else{if(durationOrMode>SET_TIMEOUT_MAX_ALLOWED_INT)throw new Error(`Failed to delay a response: provided delay duration (${durationOrMode}) exceeds the maximum allowed duration for "setTimeout" (${SET_TIMEOUT_MAX_ALLOWED_INT}). This will cause the response to be returned immediately. Please use a number within the allowed range to delay the response by exact duration, or consider the "infinite" delay mode to delay the response indefinitely.`);delayTime=durationOrMode}return new Promise(resolve=>setTimeout(resolve,delayTime))}},"./src/components/features/admin/workflows/WorkflowBuilder/index.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{A:()=>WorkflowBuilder});var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/next/dist/compiled/react/jsx-runtime.js"),react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/next/dist/compiled/react/index.js"),_components_ui__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/ui/index.ts"),_components_ui_icons__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/components/ui/icons/index.ts"),react_hot_toast__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/react-hot-toast/dist/index.mjs");const TRIGGER_OPTIONS=[{value:"USER_SIGNUP",label:"User Sign Up",description:"When a new user registers"},{value:"FIRST_PURCHASE",label:"First Purchase",description:"When a user makes their first order"},{value:"CART_ABANDONED",label:"Cart Abandoned",description:"When cart is abandoned for X minutes"},{value:"ORDER_COMPLETED",label:"Order Completed",description:"When any order is completed"},{value:"ORDER_SHIPPED",label:"Order Shipped",description:"When an order is shipped"},{value:"REVIEW_POSTED",label:"Review Posted",description:"When a user posts a review"},{value:"BIRTHDAY",label:"Birthday",description:"On the user's birthday"},{value:"INACTIVE_DAYS",label:"Inactive Days",description:"When user is inactive for X days"},{value:"POINTS_EARNED",label:"Points Earned",description:"When loyalty points are earned"},{value:"TIER_UPGRADED",label:"Tier Upgraded",description:"When loyalty tier is upgraded"},{value:"MANUAL",label:"Manual",description:"Triggered manually"}],STEP_TYPES=[{value:"SEND_EMAIL",label:"Send Email",icon:"email"},{value:"WAIT_DELAY",label:"Wait/Delay",icon:"clock"},{value:"CONDITION",label:"Condition",icon:"bolt"},{value:"ADD_POINTS",label:"Add Points",icon:"star"},{value:"APPLY_COUPON",label:"Apply Coupon",icon:"tag"},{value:"END",label:"End Workflow",icon:"check-circle"}];function WorkflowBuilder({workflowId,onSave,onCancel}){const[name,setName]=(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(""),[description,setDescription]=(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(""),[trigger,setTrigger]=(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)("USER_SIGNUP"),[steps,setSteps]=(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)([]),[isDraft,setIsDraft]=(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(!0),[saving,setSaving]=(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(!1),[loading,setLoading]=(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(!1),fetchWorkflow=(0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(async()=>{if(workflowId){setLoading(!0);try{const res=await fetch(`/api/admin/workflows/${workflowId}`),result=await res.json();if(result.success){const data=result.data;setName(data.name),setDescription(data.description||""),setTrigger(data.trigger),setIsDraft(data.isDraft),Array.isArray(data.steps)&&setSteps(data.steps)}}catch{react_hot_toast__WEBPACK_IMPORTED_MODULE_4__.Ay.error("Failed to load workflow")}finally{setLoading(!1)}}},[workflowId]);(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{workflowId&&fetchWorkflow()},[workflowId,fetchWorkflow]);const getDefaultConfig=type=>{switch(type){case"SEND_EMAIL":return{subject:"",body:""};case"WAIT_DELAY":return{duration:1,unit:"days"};case"CONDITION":return{field:"",operator:"equals",value:""};case"ADD_POINTS":return{points:100,reason:""};case"APPLY_COUPON":return{discountType:"percentage",discountValue:10};case"END":return{status:"completed"};default:return{}}},updateStep=(stepId,updates)=>{setSteps(steps.map(s=>s.id===stepId?{...s,...updates}:s))},moveStep=(index,direction)=>{const newSteps=[...steps],newIndex="up"===direction?index-1:index+1;newIndex<0||newIndex>=steps.length||([newSteps[index],newSteps[newIndex]]=[newSteps[newIndex],newSteps[index]],setSteps(newSteps))},handleSave=async(publish=!1)=>{if(name.trim())if(0!==steps.length){setSaving(!0);try{const url=workflowId?`/api/admin/workflows/${workflowId}`:"/api/admin/workflows",method=workflowId?"PUT":"POST",res=await fetch(url,{method,headers:{"Content-Type":"application/json"},body:JSON.stringify({name:name.trim(),description:description.trim()||null,trigger,steps,isDraft:!publish,isActive:!1})}),result=await res.json();result.success?(react_hot_toast__WEBPACK_IMPORTED_MODULE_4__.Ay.success(workflowId?"Workflow updated":publish?"Workflow published":"Workflow saved as draft"),onSave()):react_hot_toast__WEBPACK_IMPORTED_MODULE_4__.Ay.error(result.error||"Failed to save workflow")}catch{react_hot_toast__WEBPACK_IMPORTED_MODULE_4__.Ay.error("Failed to save workflow")}finally{setSaving(!1)}}else react_hot_toast__WEBPACK_IMPORTED_MODULE_4__.Ay.error("Add at least one step to the workflow");else react_hot_toast__WEBPACK_IMPORTED_MODULE_4__.Ay.error("Workflow name is required")},renderStepConfig=step=>{switch(step.type){case"SEND_EMAIL":return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div",{className:"space-y-3 mt-3",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("input",{type:"text",value:step.config.subject||"",onChange:e=>updateStep(step.id,{config:{...step.config,subject:e.target.value}}),placeholder:"Email subject...",className:"w-full px-3 py-2 text-sm border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("textarea",{value:step.config.body||"",onChange:e=>updateStep(step.id,{config:{...step.config,body:e.target.value}}),placeholder:"Email body... (supports {{user_name}}, {{user_email}} variables)",rows:3,className:"w-full px-3 py-2 text-sm border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100 resize-none"})]});case"WAIT_DELAY":return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div",{className:"flex items-center gap-3 mt-3",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("input",{type:"number",min:"1",value:step.config.duration||1,onChange:e=>updateStep(step.id,{config:{...step.config,duration:parseInt(e.target.value)||1}}),className:"w-20 px-3 py-2 text-sm border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("select",{value:step.config.unit||"days",onChange:e=>updateStep(step.id,{config:{...step.config,unit:e.target.value}}),className:"px-3 py-2 text-sm border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("option",{value:"minutes",children:"Minutes"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("option",{value:"hours",children:"Hours"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("option",{value:"days",children:"Days"})]})]});case"ADD_POINTS":return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div",{className:"space-y-3 mt-3",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div",{className:"flex items-center gap-3",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("input",{type:"number",min:"1",value:step.config.points||100,onChange:e=>updateStep(step.id,{config:{...step.config,points:parseInt(e.target.value)||100}}),className:"w-24 px-3 py-2 text-sm border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:"points"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("input",{type:"text",value:step.config.reason||"",onChange:e=>updateStep(step.id,{config:{...step.config,reason:e.target.value}}),placeholder:"Reason (e.g., 'Welcome bonus')",className:"w-full px-3 py-2 text-sm border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100"})]});case"APPLY_COUPON":return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div",{className:"flex items-center gap-3 mt-3",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("input",{type:"number",min:"1",max:"percentage"===step.config.discountType?100:9999,value:step.config.discountValue||10,onChange:e=>updateStep(step.id,{config:{...step.config,discountValue:parseInt(e.target.value)||10}}),className:"w-20 px-3 py-2 text-sm border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("select",{value:step.config.discountType||"percentage",onChange:e=>updateStep(step.id,{config:{...step.config,discountType:e.target.value}}),className:"px-3 py-2 text-sm border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("option",{value:"percentage",children:"% Off"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("option",{value:"fixed",children:"$ Off"})]})]});default:return null}};return loading?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_ui_icons__WEBPACK_IMPORTED_MODULE_3__.In,{name:"reload",size:32,className:"animate-spin text-primary"})}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-lg",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div",{className:"px-6 py-4 border-b border-gray-200 dark:border-gray-700",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:workflowId?"Edit Workflow":"Create Workflow"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p",{className:"text-sm text-gray-600 dark:text-gray-400 mt-1",children:"Build an automated marketing sequence"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div",{className:"p-6 space-y-6",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Workflow Name *"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("input",{type:"text",value:name,onChange:e=>setName(e.target.value),placeholder:"e.g., Welcome Series",className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100 focus:ring-2 focus:ring-primary focus:border-transparent"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Trigger"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("select",{value:trigger,onChange:e=>setTrigger(e.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100 focus:ring-2 focus:ring-primary focus:border-transparent",children:TRIGGER_OPTIONS.map(opt=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("option",{value:opt.value,children:opt.label},opt.value))}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p",{className:"mt-1 text-xs text-gray-500 dark:text-gray-400",children:TRIGGER_OPTIONS.find(t=>t.value===trigger)?.description})]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Description"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("textarea",{value:description,onChange:e=>setDescription(e.target.value),placeholder:"Describe this workflow...",rows:2,className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100 focus:ring-2 focus:ring-primary focus:border-transparent resize-none"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h3",{className:"text-lg font-medium text-gray-900 dark:text-white",children:"Workflow Steps"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:[steps.length," step",1!==steps.length?"s":""]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div",{className:"space-y-3 mb-4",children:0===steps.length?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div",{className:"text-center py-8 border-2 border-dashed border-gray-200 dark:border-gray-700 rounded-lg",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_ui_icons__WEBPACK_IMPORTED_MODULE_3__.In,{name:"bolt",size:32,className:"mx-auto mb-2 text-gray-400 dark:text-gray-600"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Add steps to build your workflow"})]}):steps.map((step,index)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div",{className:"border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div",{className:"px-4 py-3 bg-gray-50 dark:bg-gray-700/50 flex items-center justify-between",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div",{className:"flex items-center gap-3",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span",{className:"w-6 h-6 rounded-full bg-primary text-white text-xs flex items-center justify-center font-medium",children:index+1}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_ui_icons__WEBPACK_IMPORTED_MODULE_3__.In,{name:STEP_TYPES.find(s=>s.value===step.type)?.icon||"bolt",size:18,className:"text-gray-600 dark:text-gray-400"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span",{className:"font-medium text-gray-900 dark:text-white",children:step.name})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div",{className:"flex items-center gap-1",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button",{onClick:()=>moveStep(index,"up"),disabled:0===index,className:"p-1 text-gray-400 hover:text-gray-600 dark:text-gray-500 dark:hover:text-gray-300 disabled:opacity-50",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_ui_icons__WEBPACK_IMPORTED_MODULE_3__.In,{name:"chevron-up",size:16})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button",{onClick:()=>moveStep(index,"down"),disabled:index===steps.length-1,className:"p-1 text-gray-400 hover:text-gray-600 dark:text-gray-500 dark:hover:text-gray-300 disabled:opacity-50",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_ui_icons__WEBPACK_IMPORTED_MODULE_3__.In,{name:"chevron-down",size:16})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button",{onClick:()=>{return stepId=step.id,void setSteps(steps.filter(s=>s.id!==stepId));var stepId},className:"p-1 text-red-400 hover:text-red-600",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_ui_icons__WEBPACK_IMPORTED_MODULE_3__.In,{name:"trash",size:16})})]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div",{className:"px-4 py-3",children:renderStepConfig(step)})]},step.id))}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div",{className:"flex flex-wrap gap-2",children:STEP_TYPES.map(stepType=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_ui__WEBPACK_IMPORTED_MODULE_2__.$n,{variant:"outline",size:"sm",onClick:()=>(type=>{const newStep={id:`step_${Date.now()}`,type,name:STEP_TYPES.find(s=>s.value===type)?.label||type,config:getDefaultConfig(type)};setSteps([...steps,newStep])})(stepType.value),leftIcon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_ui_icons__WEBPACK_IMPORTED_MODULE_3__.In,{name:stepType.icon,size:14}),children:stepType.label},stepType.value))})]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div",{className:"px-6 py-4 border-t border-gray-200 dark:border-gray-700 flex items-center justify-between",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:isDraft?"Draft - not active":"Published"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div",{className:"flex items-center gap-3",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_ui__WEBPACK_IMPORTED_MODULE_2__.$n,{variant:"ghost",onClick:onCancel,disabled:saving,children:"Cancel"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_ui__WEBPACK_IMPORTED_MODULE_2__.$n,{variant:"outline",onClick:()=>handleSave(!1),disabled:saving,children:saving?"Saving...":"Save Draft"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_ui__WEBPACK_IMPORTED_MODULE_2__.$n,{variant:"primary",onClick:()=>handleSave(!0),disabled:saving||!name.trim()||0===steps.length,children:saving?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_ui_icons__WEBPACK_IMPORTED_MODULE_3__.In,{name:"reload",size:16,className:"mr-2 animate-spin"}),"Saving..."]}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_ui_icons__WEBPACK_IMPORTED_MODULE_3__.In,{name:"check",size:16,className:"mr-2"}),workflowId&&!isDraft?"Update":"Publish"]})})]})]})]})}}}]);

Youez - 2016 - github.com/yon3zu
LinuXploit