import{B as e,Ct as t,E as n,F as r,H as i,It as a,Mt as o,Q as s,W as c,Z as l,_t as u,at as d,d as f,ft as p,ht as m,jt as h,k as g,mt as _,ot as v,rt as y,s as b,st as x,tt as S,ut as C,wt as w}from"../chunks/BA99CCI5.js";import"../chunks/xihTtKlq.js";import"../chunks/DGo8yE5j.js";import{t as T}from"../chunks/BfBgZfCV2.js";import{t as E}from"../chunks/DSmeX4VS2.js";var D=c(`<div><!> <!></div>`);function O(c,O){o(O,!1);let k=()=>w(T,`$page`,A),[A,j]=t(),M=m(),N=m(),P=m(),F=m(),I=b(O,`data`,8);d(()=>k(),()=>{u(M,k().url.pathname)}),d(()=>s(M),()=>{u(N,s(M).includes(`/quality-definitions`)?`quality-definitions`:s(M).includes(`/media-settings`)?`media-settings`:`naming`)}),d(()=>s(M),()=>{u(P,s(M).includes(`/new`)||s(M).includes(`/radarr/`)||s(M).includes(`/sonarr/`))}),d(()=>(l(I()),s(N)),()=>{u(F,I().databases.map(e=>({label:e.name,href:`/media-management/${e.id}/${s(N)}`,active:e.id===I().currentDatabase.id})))}),v(),f();var L=D();g(`1hbq6jz`,e=>{y(()=>{C.title=`Media Management - ${l(I()),S(()=>I().currentDatabase?.name)??``} - Profilarr`})});var R=p(L),z=e=>{E(e,{get tabs(){return s(F)}})};e(R,e=>{s(P)||e(z)});var B=_(R,2);r(B,O,`default`,{},null),a(L),x(()=>n(L,1,`space-y-6 px-4 pb-8 md:px-8 ${s(P)?`pt-3 md:pt-7`:``}`)),i(c,L),h(),j()}export{O as component};