import{c as E,r as f,ac as v,j as l}from"./index-BcdQIGUF.js";import{B as w}from"./button-BVfOTfpc.js";import{i as k}from"./ArrowLeft-BkK50n5W.js";const j=f.createContext(null);function S(x){const e=E.c(3),{children:n}=x,s=f.useContext(j);if(!s?.tabsEl)return null;let t;return e[0]!==n||e[1]!==s.tabsEl?(t=v.createPortal(n,s.tabsEl),e[0]=n,e[1]=s.tabsEl,e[2]=t):t=e[2],t}function _(x){const e=E.c(3),{children:n}=x,s=f.useContext(j);if(!s?.actionsEl)return null;let t;return e[0]!==n||e[1]!==s.actionsEl?(t=v.createPortal(n,s.actionsEl),e[0]=n,e[1]=s.actionsEl,e[2]=t):t=e[2],t}function B(x){const e=E.c(20),{children:n,onBack:s,title:t}=x,[b,N]=f.useState(null),[p,g]=f.useState(null);let c;e[0]!==p||e[1]!==b?(c={tabsEl:b,actionsEl:p},e[0]=p,e[1]=b,e[2]=c):c=e[2];let u;e[3]===Symbol.for("react.memo_cache_sentinel")?(u=l.jsx(k,{}),e[3]=u):u=e[3];let i;e[4]!==s?(i=l.jsx("div",{className:"flex h-full px-2 border-r items-center",children:l.jsx(w,{variant:"ghost",size:"icon",className:"items-center size-8 text-muted-foreground",onClick:s,children:u})}),e[4]=s,e[5]=i):i=e[5];let r;e[6]!==t?(r=t&&l.jsx("div",{className:"flex items-center gap-2 px-2",children:l.jsx("p",{className:"text-sm font-medium",children:t})}),e[6]=t,e[7]=r):r=e[7];let d;e[8]===Symbol.for("react.memo_cache_sentinel")?(d=l.jsxs("div",{className:"flex px-4 items-center gap-0 flex-1 min-w-0",children:[l.jsx("div",{ref:N,className:"flex items-center gap-2 overflow-x-auto min-w-0"}),l.jsx("div",{ref:g,className:"flex items-center gap-2 ml-auto shrink-0"})]}),e[8]=d):d=e[8];let a;e[9]!==i||e[10]!==r?(a=l.jsxs("div",{className:"flex items-center h-12 border-b border-border shrink-0",children:[i,r,d]}),e[9]=i,e[10]=r,e[11]=a):a=e[11];let o;e[12]!==n?(o=l.jsx("div",{className:"flex-1 overflow-auto",children:n}),e[12]=n,e[13]=o):o=e[13];let m;e[14]!==a||e[15]!==o?(m=l.jsxs("div",{className:"flex flex-col h-full bg-background",children:[a,o]}),e[14]=a,e[15]=o,e[16]=m):m=e[16];let h;return e[17]!==c||e[18]!==m?(h=l.jsx(j,{value:c,children:m}),e[17]=c,e[18]=m,e[19]=h):h=e[19],h}export{_ as V,S as a,B as b};
