import{Dt as e,I as t,Q as n,T as r,bt as i,j as a,k as o}from"./_plugin-vue_export-helper-BVhEvvHC.js";import{t as s}from"./CreateMatchForm-Ch8Qtiio.js";import{t as c}from"./MatchSwitchDialog-B24lRLux.js";import{t as l}from"./axios-DSyjHw-i.js";import{h as u}from"./useApi-CROJJdhE-bFLQvr8j.js";t(),i();var d={class:`h-full w-full`},f=a({__name:`CreateSimpleMatchView`,setup(t){let i=u(),a=i.currentRoute.value,f=e(!1),p=a.query.current===`true`;function m(e){p&&(e.isCurrent=!0,console.log(`Setting match as current`)),h(e)}function h(e){l({method:`put`,url:`/match`,data:e}).then(()=>{i.go(-1)}).catch(e=>{console.error(e)})}function g(){i.go(-1)}function _(e){i.go(-1)}return(e,t)=>(n(),r(`div`,d,[o(s,{"show-resume-matches":``,onCreate:m,onCancel:g,onResume:t[0]||=e=>f.value=!0}),o(c,{open:f.value,"onUpdate:open":t[1]||=e=>f.value=e,"current-match":null,"show-create-action":!1,onSwitched:_},null,8,[`open`])]))}});export{f as default};