import{a as h,j as e,r as j}from"./vendor-react-wBh_31cN.js";import{d as u}from"./index-dNe6i2rS.js";import{A as g}from"./animated-progress-DY4TkPAt.js";import{S as v}from"./separator-CxqNNMXg.js";import{V as x}from"./value-7N0Keti9.js";const w=({children:s})=>{const a=document.getElementById("panel-portal");return a?h.createPortal(e.jsx("div",{className:"sticky top-0 z-10 w-full flex flex-col",children:s}),a):s},A=({tabs:s,toolbar:a,secondaryToolbar:l,count:t,countContent:p,tools:i,portal:m=!0,isFetching:o=!1,className:d})=>{const r=[];s&&r.push(s),a&&r.push(a),l&&r.push(l),(t||p||i)&&r.push(e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-x-4 gap-y-2",children:[p??(t?e.jsxs("div",{className:"flex items-center gap-1.5 whitespace-nowrap",children:[e.jsx(x,{primary:!0,children:t.value}),e.jsx(x,{children:t.label})]}):e.jsx("div",{})),i&&e.jsx("div",{className:"flex flex-wrap items-center gap-2.5",children:i})]}));const n=e.jsxs("div",{className:u("relative flex flex-col bg-card pt-4",d),children:[o&&e.jsx(g,{isAnimating:!0,className:"absolute inset-x-0 top-0 z-10 h-0.5 rounded-none bg-transparent"}),r.map((f,c)=>e.jsxs(j.Fragment,{children:[e.jsx("div",{className:c===0?"px-5 pb-3":"px-5 py-3",children:f}),e.jsx(v,{})]},c))]});return m?e.jsx(w,{children:n}):e.jsx("div",{className:"sticky top-0 z-10",children:n})};export{A as L};
