import{B as e,Ct as t,H as n,Mt as r,Q as i,W as a,Z as o,d as s,i as c,jt as l,mt as u,pt as d,s as f,tt as p,wt as m,yt as h}from"../chunks/BA99CCI5.js";import{a as g}from"../chunks/DP37y6wO.js";import"../chunks/xihTtKlq.js";import"../chunks/DGo8yE5j.js";import{t as _}from"../chunks/BfBgZfCV2.js";import"../chunks/BymfG72d2.js";import{t as v}from"../chunks/CEQEwD8g.js";import{t as y}from"../chunks/DCohNkHF.js";import{t as b}from"../chunks/CZKMGon_2.js";var x=a(`<!> <!> <!>`,1);function S(a,S){r(S,!1);let C=()=>m(_,`$page`,w),[w,T]=t(),E=f(S,`data`,8),D=C().url.searchParams.get(`arrType`);c(()=>{D||g(`/media-management/${E().currentDatabase.id}/media-settings`,{replaceState:!0})}),s();var O=x(),k=d(O);{let e=h(()=>(o(E()),p(()=>`${E().currentDatabase.name} · Media Settings · New`)));y(k,{get title(){return i(e)}})}var A=u(k,2),j=e=>{{let t=h(()=>(o(E()),p(()=>E().currentDatabase?.name)));b(e,{mode:`create`,get arrType(){return D},get databaseName(){return i(t)},get canWriteToBase(){return o(E()),p(()=>E().canWriteToBase)},initialData:null})}};e(A,e=>{D&&e(j)});var M=u(A,2);v(M,{}),n(a,O),l(),T()}export{S as component};