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/Cn82cK4Q2.js";import{t as x}from"../chunks/BeyNTdTZ2.js";var S=a(`<!> <!> <!>`,1);function C(a,C){r(C,!1);let w=()=>m(_,`$page`,T),[T,E]=t(),D=f(C,`data`,8),O=w().url.searchParams.get(`arrType`);c(()=>{O||g(`/media-management/${D().currentDatabase.id}/naming`,{replaceState:!0})}),s();var k=S(),A=d(k);{let e=h(()=>(o(D()),p(()=>`${D().currentDatabase.name} · Naming · New`)));y(A,{get title(){return i(e)}})}var j=u(A,2),M=e=>{{let t=h(()=>(o(D()),p(()=>D().currentDatabase?.name)));b(e,{mode:`create`,get databaseName(){return i(t)},get canWriteToBase(){return o(D()),p(()=>D().canWriteToBase)},initialData:null})}},N=e=>{{let t=h(()=>(o(D()),p(()=>D().currentDatabase?.name)));x(e,{mode:`create`,get databaseName(){return i(t)},get canWriteToBase(){return o(D()),p(()=>D().canWriteToBase)},initialData:null})}};e(j,e=>{O===`radarr`?e(M):O===`sonarr`&&e(N,1)});var P=u(j,2);v(P,{}),n(a,k),l(),E()}export{C as component};