import{f as P,a as v}from"../chunks/nUxvHMgL.js";import{o as b}from"../chunks/DPMBEg2i.js";import{p as w,a as $,c as r,s,e as y,d as S,g as i,r as _}from"../chunks/CNYbWU2B.js";import{k as C}from"../chunks/C4CP8qua.js";import{a as M,b as k}from"../chunks/CxfCsaSi.js";import{g as n}from"../chunks/qoE10lYN.js";import{r as m}from"../chunks/CbhfpbUc.js";import{p as F}from"../chunks/DlJfzioE.js";import{p}from"../chunks/D9xfsXh9.js";import{a as N}from"../chunks/XA37G8Ta.js";var j=P('<div class="max-w-2xl mx-auto"><h1 class="text-2xl font-bold mb-6">Create Server Profile</h1> <!></div>');function K(l,f){w(f,!0);const c=()=>k(F,"$page",u),[u,d]=M();let o=s(10240),e=s("");b(async()=>{r(o,await p.getNextPort(),!0);const t=c().url.searchParams.get("model");t&&r(e,t,!0)});async function g(t){await p.create(t),await n(m("/profiles"))}async function h(){await n(m("/profiles"))}var a=j(),x=y(S(a),2);C(x,()=>"new-profile",t=>{N(t,{get nextPort(){return i(o)},get initialModelPath(){return i(e)},onSubmit:g,onCancel:h})}),_(a),v(l,a),$(),d()}export{K as component};
