import{f as x,a as v}from"../chunks/vfPE-AD7.js";import{p as $,o as b,c as w,f as S,d as r,s,e as _,g as i,r as y}from"../chunks/DhUiKsxN.js";import{s as C,a as M}from"../chunks/DUil1G3I.js";import{g as n}from"../chunks/b2QY-nV2.js";import{r as m}from"../chunks/DyqxJaEr.js";import{p as F}from"../chunks/B2gI4nmm.js";import{p as l}from"../chunks/DEcqogKB.js";import{P as N}from"../chunks/CwpRVHMW.js";import"../chunks/BWzyK28a.js";var j=x('<div class="max-w-2xl mx-auto"><h1 class="text-2xl font-bold mb-6">Create Server Profile</h1> <!></div>');function I(p,f){$(f,!0);const c=()=>M(F,"$page",u),[u,d]=C();let o=s(10240),e=s("");b(async()=>{r(o,await l.getNextPort(),!0);const t=c().url.searchParams.get("model");t&&r(e,t,!0)});async function g(t){await l.create(t),await n(m("/profiles"))}async function h(){await n(m("/profiles"))}var a=j(),P=S(_(a),2);N(P,{get nextPort(){return i(o)},get initialModelPath(){return i(e)},onSubmit:g,onCancel:h}),y(a),v(p,a),w(),d()}export{I as component};
