import{b as V,j as t,L as P,r as E}from"./app-DC5MhnUn.js";import{c as w}from"./compiler-runtime-x4HYykYJ.js";import{N as O,H as U}from"./Notification-Cv-2Hqof.js";function D(o){const e=w.c(56),{isOpen:l,onClose:s,collapsed:r,onToggleCollapse:i}=o,a=r===void 0?!1:r,{url:H}=V();let d,z,C,b,n,u,k,x;if(e[0]!==a||e[1]!==l||e[2]!==s||e[3]!==i||e[4]!==H){const R=[{name:"Dashboard",href:"/dashboard",icon:J},{name:"Jadwal Show",href:"/dashboard/shows",icon:K},{name:"Replay",href:"/dashboard/replay",icon:ee},{name:"Topup Coin",href:"/topup-coin",icon:Y},{name:"Riwayat Transaksi",href:"/dashboard/transactions",icon:Z},{name:"Settings",href:"/settings",icon:X}],W=F,A=`hidden lg:fixed lg:inset-y-0 lg:z-50 lg:flex lg:flex-col transition-all duration-300 ease-in-out ${a?"lg:w-20":"lg:w-72"}`,_=`flex h-16 shrink-0 items-center gap-3 ${a?"justify-center":""}`;let j;e[13]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-[#d4af37] dark:bg-[#b8941f]",children:t.jsx("span",{className:"text-xl font-bold text-white",children:"N"})}),e[13]=j):j=e[13];let L;e[14]!==a?(L=!a&&t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("h1",{className:"text-lg font-bold text-gray-900 dark:text-white truncate",children:"NgidoliHub"}),t.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 truncate",children:"Streaming Platform"})]}),e[14]=a,e[15]=L):L=e[15];let h;e[16]!==a||e[17]!==i?(h=!a&&i&&t.jsx("button",{onClick:i,className:"ml-auto rounded-md p-1.5 text-gray-400 hover:bg-gray-100 hover:text-gray-600 dark:hover:bg-gray-700 dark:hover:text-gray-300",title:"Minimize sidebar",children:t.jsx(G,{className:"h-5 w-5"})}),e[16]=a,e[17]=i,e[18]=h):h=e[18];let m;e[19]!==_||e[20]!==L||e[21]!==h?(m=t.jsxs("div",{className:_,children:[j,L,h]}),e[19]=_,e[20]=L,e[21]=h,e[22]=m):m=e[22];const $=t.jsx("ul",{role:"list",className:"flex flex-1 flex-col gap-y-1",children:R.map(p=>{const T=W(p.href,H);return t.jsx("li",{children:t.jsxs(P,{href:p.href,className:`
                                                group flex items-center gap-x-3 rounded-md p-3 text-sm font-semibold leading-6 transition-colors relative
                                                ${T?"bg-[#d4af37]/10 text-[#d4af37] dark:bg-[#b8941f]/20 dark:text-[#b8941f]":"text-gray-700 hover:bg-gray-50 hover:text-[#d4af37] dark:text-gray-300 dark:hover:bg-gray-700/50 dark:hover:text-[#b8941f]"}
                                                ${a?"justify-center":""}
                                            `,title:a?p.name:void 0,children:[t.jsx(p.icon,{className:`h-6 w-6 shrink-0 ${T?"text-[#d4af37] dark:text-[#b8941f]":"text-gray-400 group-hover:text-[#d4af37] dark:text-gray-500 dark:group-hover:text-[#b8941f]"}`}),!a&&t.jsx("span",{className:"truncate",children:p.name}),a&&T&&t.jsx("span",{className:"absolute left-0 top-1/2 -translate-y-1/2 h-8 w-1 rounded-r-full bg-[#d4af37] dark:bg-[#b8941f]"})]})},p.name)})});let g;e[23]!==a||e[24]!==i?(g=a&&i&&t.jsx("div",{className:"mt-auto pt-2",children:t.jsx("button",{onClick:i,className:"w-full rounded-md p-3 text-gray-400 hover:bg-gray-100 hover:text-gray-600 dark:hover:bg-gray-700 dark:hover:text-gray-300",title:"Expand sidebar",children:t.jsx(Q,{className:"h-6 w-6 mx-auto"})})}),e[23]=a,e[24]=i,e[25]=g):g=e[25];let N;e[26]!==$||e[27]!==g?(N=t.jsxs("nav",{className:"flex flex-1 flex-col",children:[$,g]}),e[26]=$,e[27]=g,e[28]=N):N=e[28];let c;e[29]!==m||e[30]!==N?(c=t.jsxs("div",{className:"flex grow flex-col gap-y-5 overflow-y-auto border-r border-gray-200 bg-white px-3 pb-4 dark:border-gray-700 dark:bg-gray-800",children:[m,N]}),e[29]=m,e[30]=N,e[31]=c):c=e[31],e[32]!==A||e[33]!==c?(x=t.jsx("aside",{className:A,children:c}),e[32]=A,e[33]=c,e[34]=x):x=e[34],k=`
                    fixed inset-y-0 left-0 z-50 w-72 transform bg-white transition-transform duration-300 ease-in-out dark:bg-gray-800 lg:hidden
                    ${l?"translate-x-0":"-translate-x-full"}
                `,n="flex h-full flex-col gap-y-5 overflow-y-auto border-r border-gray-200 px-6 pb-4 dark:border-gray-700";let f;e[35]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-lg bg-[#d4af37] dark:bg-[#b8941f]",children:t.jsx("span",{className:"text-xl font-bold text-white",children:"N"})}),t.jsxs("div",{children:[t.jsx("h1",{className:"text-lg font-bold text-gray-900 dark:text-white",children:"NgidoliHub"}),t.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:"Streaming Platform"})]})]}),e[35]=f):f=e[35];let B;e[36]===Symbol.for("react.memo_cache_sentinel")?(B=t.jsx(q,{className:"h-6 w-6"}),e[36]=B):B=e[36],e[37]!==s?(u=t.jsxs("div",{className:"flex h-16 shrink-0 items-center justify-between gap-3",children:[f,t.jsx("button",{onClick:s,className:"rounded-md p-2 text-gray-400 hover:bg-gray-100 hover:text-gray-500 dark:hover:bg-gray-700",children:B})]}),e[37]=s,e[38]=u):u=e[38],b="flex flex-1 flex-col",d="list",z="flex flex-1 flex-col gap-y-1",C=R.map(p=>{const T=W(p.href,H);return t.jsx("li",{children:t.jsxs(P,{href:p.href,onClick:s,className:`
                                                group flex gap-x-3 rounded-md p-3 text-sm font-semibold leading-6 transition-colors
                                                ${T?"bg-[#d4af37]/10 text-[#d4af37] dark:bg-[#b8941f]/20 dark:text-[#b8941f]":"text-gray-700 hover:bg-gray-50 hover:text-[#d4af37] dark:text-gray-300 dark:hover:bg-gray-700/50 dark:hover:text-[#b8941f]"}
                                            `,children:[t.jsx(p.icon,{className:`h-6 w-6 shrink-0 ${T?"text-[#d4af37] dark:text-[#b8941f]":"text-gray-400 group-hover:text-[#d4af37] dark:text-gray-500 dark:group-hover:text-[#b8941f]"}`}),p.name]})},p.name)}),e[0]=a,e[1]=l,e[2]=s,e[3]=i,e[4]=H,e[5]=d,e[6]=z,e[7]=C,e[8]=b,e[9]=n,e[10]=u,e[11]=k,e[12]=x}else d=e[5],z=e[6],C=e[7],b=e[8],n=e[9],u=e[10],k=e[11],x=e[12];let y;e[39]!==d||e[40]!==z||e[41]!==C?(y=t.jsx("ul",{role:d,className:z,children:C}),e[39]=d,e[40]=z,e[41]=C,e[42]=y):y=e[42];let I;e[43]!==y||e[44]!==b?(I=t.jsx("nav",{className:b,children:y}),e[43]=y,e[44]=b,e[45]=I):I=e[45];let v;e[46]!==I||e[47]!==n||e[48]!==u?(v=t.jsxs("div",{className:n,children:[u,I]}),e[46]=I,e[47]=n,e[48]=u,e[49]=v):v=e[49];let S;e[50]!==v||e[51]!==k?(S=t.jsx("aside",{className:k,children:v}),e[50]=v,e[51]=k,e[52]=S):S=e[52];let M;return e[53]!==S||e[54]!==x?(M=t.jsxs(t.Fragment,{children:[x,S]}),e[53]=S,e[54]=x,e[55]=M):M=e[55],M}function F(o,e){const l=o.replace(/\/$/,""),s=e.split("?")[0].replace(/\/$/,"");return s===l?!0:l==="/dashboard"?s==="/dashboard":!!s.startsWith(l+"/")}function J(o){const e=w.c(3),{className:l}=o;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12l8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25"}),e[0]=s):s=e[0];let r;return e[1]!==l?(r=t.jsx("svg",{className:l,fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",children:s}),e[1]=l,e[2]=r):r=e[2],r}function K(o){const e=w.c(3),{className:l}=o;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5"}),e[0]=s):s=e[0];let r;return e[1]!==l?(r=t.jsx("svg",{className:l,fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",children:s}),e[1]=l,e[2]=r):r=e[2],r}function X(o){const e=w.c(4),{className:l}=o;let s,r;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.324.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 011.37.49l1.296 2.247a1.125 1.125 0 01-.26 1.431l-1.003.827c-.293.24-.438.613-.431.992a6.759 6.759 0 010 .255c-.007.378.138.75.43.99l1.005.828c.424.35.534.954.26 1.43l-1.298 2.247a1.125 1.125 0 01-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.57 6.57 0 01-.22.128c-.331.183-.581.495-.644.869l-.213 1.28c-.09.543-.56.941-1.11.941h-2.594c-.55 0-1.02-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 01-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 01-1.369-.49l-1.297-2.247a1.125 1.125 0 01.26-1.431l1.004-.827c.292-.24.437-.613.43-.992a6.932 6.932 0 010-.255c.007-.378-.138-.75-.43-.99l-1.004-.828a1.125 1.125 0 01-.26-1.43l1.297-2.247a1.125 1.125 0 011.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.087.22-.128.332-.183.582-.495.644-.869l.214-1.281z"}),r=t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),e[0]=s,e[1]=r):(s=e[0],r=e[1]);let i;return e[2]!==l?(i=t.jsxs("svg",{className:l,fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",children:[s,r]}),e[2]=l,e[3]=i):i=e[3],i}function q(o){const e=w.c(3),{className:l}=o;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}),e[0]=s):s=e[0];let r;return e[1]!==l?(r=t.jsx("svg",{className:l,fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",children:s}),e[1]=l,e[2]=r):r=e[2],r}function G(o){const e=w.c(3),{className:l}=o;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5L8.25 12l7.5-7.5"}),e[0]=s):s=e[0];let r;return e[1]!==l?(r=t.jsx("svg",{className:l,fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",children:s}),e[1]=l,e[2]=r):r=e[2],r}function Q(o){const e=w.c(3),{className:l}=o;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"}),e[0]=s):s=e[0];let r;return e[1]!==l?(r=t.jsx("svg",{className:l,fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",children:s}),e[1]=l,e[2]=r):r=e[2],r}function Y(o){const e=w.c(3),{className:l}=o;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v12m-3-2.818l.879.659c1.171.879 3.07.879 4.242 0 1.172-.879 1.172-2.303 0-3.182C13.536 12.219 12.768 12 12 12c-.725 0-1.45-.22-2.003-.659-1.106-.879-1.106-2.303 0-3.182s2.9-.879 4.006 0l.415.33M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}),e[0]=s):s=e[0];let r;return e[1]!==l?(r=t.jsx("svg",{className:l,fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",children:s}),e[1]=l,e[2]=r):r=e[2],r}function Z(o){const e=w.c(3),{className:l}=o;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"}),e[0]=s):s=e[0];let r;return e[1]!==l?(r=t.jsx("svg",{className:l,fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",children:s}),e[1]=l,e[2]=r):r=e[2],r}function ee(o){const e=w.c(3),{className:l}=o;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 5.653c0-.856.917-1.398 1.667-.986l11.54 6.348a1.125 1.125 0 010 1.971l-11.54 6.347a1.125 1.125 0 01-1.667-.986V5.653z"}),e[0]=s):s=e[0];let r;return e[1]!==l?(r=t.jsx("svg",{className:l,fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",children:s}),e[1]=l,e[2]=r):r=e[2],r}function ae(o){const e=w.c(36),{children:l,title:s}=o,[r,i]=E.useState(null),[a,H]=E.useState(!1),[d,z]=E.useState(te),{props:C}=V();let b;e[0]!==C?(b=C.flash||{},e[0]=C,e[1]=b):b=e[1];const n=b,u=E.useRef("");let k,x;e[2]!==n.error||e[3]!==n.info||e[4]!==n.success||e[5]!==n.warning?(k=()=>{let c=null,f="";n.success?(c="success",f=n.success):n.error?(c="error",f=n.error):n.warning?(c="warning",f=n.warning):n.info&&(c="info",f=n.info);const B=c&&f?`${c}-${f}-${Date.now()}`:"";c&&f&&B!==u.current?(u.current=B,i(null),setTimeout(()=>{i({type:c,message:f})},100)):!c&&!f&&i(null)},x=[n.success,n.error,n.warning,n.info],e[2]=n.error,e[3]=n.info,e[4]=n.success,e[5]=n.warning,e[6]=k,e[7]=x):(k=e[6],x=e[7]),E.useEffect(k,x);let y;e[8]===Symbol.for("react.memo_cache_sentinel")?(y=()=>{i(null),u.current=""},e[8]=y):y=e[8];const I=y;let v;e[9]!==a?(v=()=>{H(!a)},e[9]=a,e[10]=v):v=e[10];const S=v;let M;e[11]===Symbol.for("react.memo_cache_sentinel")?(M=()=>{H(!1)},e[11]=M):M=e[11];const R=M;let W;e[12]!==d?(W=()=>{const c=!d;z(c),typeof window<"u"&&localStorage.setItem("sidebarCollapsed",String(c))},e[12]=d,e[13]=W):W=e[13];const A=W;let _;e[14]!==A||e[15]!==d||e[16]!==a?(_=t.jsx(D,{isOpen:a,onClose:R,collapsed:d,onToggleCollapse:A}),e[14]=A,e[15]=d,e[16]=a,e[17]=_):_=e[17];let j;e[18]!==a?(j=a&&t.jsx("div",{className:"fixed inset-0 z-40 bg-gray-600 bg-opacity-75 transition-opacity lg:hidden",onClick:R}),e[18]=a,e[19]=j):j=e[19];const L=`transition-all duration-300 ease-in-out ${d?"lg:pl-20":"lg:pl-72"}`;let h;e[20]!==S||e[21]!==s?(h=t.jsx(U,{onMenuClick:S,title:s}),e[20]=S,e[21]=s,e[22]=h):h=e[22];let m;e[23]!==l?(m=t.jsx("main",{className:"flex-1",children:t.jsx("div",{className:"mx-auto max-w-7xl px-4 py-6 sm:px-6 lg:px-8",children:l})}),e[23]=l,e[24]=m):m=e[24];let $;e[25]!==L||e[26]!==h||e[27]!==m?($=t.jsxs("div",{className:L,children:[h,m]}),e[25]=L,e[26]=h,e[27]=m,e[28]=$):$=e[28];let g;e[29]!==r?(g=r&&t.jsx(O,{type:r.type,message:r.message,onClose:I}),e[29]=r,e[30]=g):g=e[30];let N;return e[31]!==$||e[32]!==g||e[33]!==_||e[34]!==j?(N=t.jsxs("div",{className:"flex min-h-screen flex-col bg-gray-50 dark:bg-gray-900",children:[_,j,$,g]}),e[31]=$,e[32]=g,e[33]=_,e[34]=j,e[35]=N):N=e[35],N}function te(){return typeof window<"u"?localStorage.getItem("sidebarCollapsed")==="true":!1}export{ae as U};
