const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./template-DuFcEUqg.js","./useflows-BpG3C9m1.js","./main-few-lands-burn.js","./main-bit-pi-ba-assets-few-lands-burn.css","./mutative-C6xjlr6O.js","./lodash-YpNkAOPN.js","./template-BoyFcOdJ.js"])))=>i.map(i=>d[i]);
import{c as p,_ as t}from"./main-few-lands-burn.js";import{d as m}from"./useflows-BpG3C9m1.js";const o=Object.assign({"../templates/template-1.ts":()=>t(()=>import("./template-DuFcEUqg.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),"../templates/template-10.ts":()=>t(()=>import("./template-ua-yr4UU.js"),[],import.meta.url),"../templates/template-11.ts":()=>t(()=>import("./template-kjffZQcc.js"),[],import.meta.url),"../templates/template-12.ts":()=>t(()=>import("./template-3zf46CLj.js"),[],import.meta.url),"../templates/template-13.ts":()=>t(()=>import("./template-CeOvwM-c.js"),[],import.meta.url),"../templates/template-14.ts":()=>t(()=>import("./template-C6BxHUZo.js"),[],import.meta.url),"../templates/template-15.ts":()=>t(()=>import("./template-a-pEUJHc.js"),[],import.meta.url),"../templates/template-16.ts":()=>t(()=>import("./template-BtaPMm9T.js"),[],import.meta.url),"../templates/template-17.ts":()=>t(()=>import("./template-DhGhUs9W.js"),[],import.meta.url),"../templates/template-18.ts":()=>t(()=>import("./template-ou3z0tiE.js"),[],import.meta.url),"../templates/template-19.ts":()=>t(()=>import("./template-BHUNIET3.js"),[],import.meta.url),"../templates/template-2.ts":()=>t(()=>import("./template-8g398-Cv.js"),[],import.meta.url),"../templates/template-20.ts":()=>t(()=>import("./template-7woSMwUn.js"),[],import.meta.url),"../templates/template-21.ts":()=>t(()=>import("./template-BRgbqMFK.js"),[],import.meta.url),"../templates/template-22.ts":()=>t(()=>import("./template-FX3TA_IZ.js"),[],import.meta.url),"../templates/template-23.ts":()=>t(()=>import("./template-CZt1J_S1.js"),[],import.meta.url),"../templates/template-24.ts":()=>t(()=>import("./template-BzdtS_d6.js"),[],import.meta.url),"../templates/template-25.ts":()=>t(()=>import("./template-C99h76Zc.js"),[],import.meta.url),"../templates/template-3.ts":()=>t(()=>import("./template-u4a5Fqs_.js"),[],import.meta.url),"../templates/template-4.ts":()=>t(()=>import("./template-B9HspGqc.js"),[],import.meta.url),"../templates/template-5.ts":()=>t(()=>import("./template-CztxbfLb.js"),[],import.meta.url),"../templates/template-6.ts":()=>t(()=>import("./template-DDfQ3vfN.js"),[],import.meta.url),"../templates/template-7.ts":()=>t(()=>import("./template-CJPKrWrR.js"),[],import.meta.url),"../templates/template-8.ts":()=>t(()=>import("./template-DjE_DsI0.js"),[],import.meta.url),"../templates/template-9.ts":()=>t(()=>import("./template-BXEDQF3K.js"),[],import.meta.url),"../templates/templates.ts":()=>t(()=>import("./template-BoyFcOdJ.js"),__vite__mapDeps([6,2,3]),import.meta.url)}),s={errorMessage:"",flowData:m,flows:[],flowTitle:"Untitled Flow",isCreateFlowModalOpen:!1,isFetchingTemplate:!1,isTitleChangedByUser:!1,selectedTemplateId:"blank"},E=p((l,r)=>({...s,actions:{handleFlowTitleChange:e=>l({flowTitle:e,isTitleChangedByUser:e.trim()!==""}),handleModal:e=>l({flowData:m,flowTitle:"Untitled Flow",isCreateFlowModalOpen:e,isTitleChangedByUser:!1,selectedTemplateId:e?"blank":!1}),selectTemplate:async(e,a)=>{if(e==="blank"){l({flowData:m,selectedTemplateId:e}),r().isTitleChangedByUser||l({flowTitle:"Untitled Flow"});return}l({isFetchingTemplate:!0});for(const _ in o)if(_.split("/").at(-1)?.includes(`${e}.ts`)){const i=await o[_]();l({flowData:i.default,selectedTemplateId:e}),r().isTitleChangedByUser||l({flowTitle:a});break}l({isFetchingTemplate:!1})},setCreateFlowModalOpen:e=>l({isCreateFlowModalOpen:e}),setErrorMessage:e=>l({errorMessage:e}),setFlowData:e=>l({flowData:e}),setFlows:e=>l(a=>({flows:typeof e=="function"?e(a.flows):e})),setSelectedTemplateId:e=>l({selectedTemplateId:e})}}));export{E as u};
