import*as e from"react";import{useTabs as s,TabsDescendantsProvider as a,TabsProvider as t,useTab as r,useTabList as m,useTabPanel as l,useTabPanels as i,useTabIndicator as n}from"./use-tabs.js";import{omitThemingProps as c}from"../../../system/dist/esm/system.utils.js";import{forwardRef as o}from"../../../system/dist/esm/forward-ref.js";import{useMultiStyleConfig as d}from"../../../system/dist/esm/use-style-config.js";import{omit as p}from"../../../utils/dist/esm/object.js";import{StylesProvider as f,useStyles as b}from"../../../system/dist/esm/providers.js";import{chakra as u}from"../../../system/dist/esm/system.js";import{cx as v}from"../../../utils/dist/esm/dom.js";import{__DEV__ as y}from"../../../utils/dist/esm/assertion.js";function _(){return(_=Object.assign||function(e){for(var s=1;s<arguments.length;s++){var a=arguments[s];for(var t in a)Object.prototype.hasOwnProperty.call(a,t)&&(e[t]=a[t])}return e}).apply(this,arguments)}function N(e,s){if(null==e)return{};var a,t,r={},m=Object.keys(e);for(t=0;t<m.length;t++)a=m[t],s.indexOf(a)>=0||(r[a]=e[a]);return r}var h=o(((r,m)=>{var l=d("Tabs",r),i=c(r),{children:n,className:o}=i,b=N(i,["children","className"]),y=s(b),{htmlProps:h,descendants:j}=y,E=N(y,["htmlProps","descendants"]),k=e.useMemo((()=>E),[E]),T=p(h,["isFitted"]);return e.createElement(a,{value:j},e.createElement(t,{value:k},e.createElement(f,{value:l},e.createElement(u.div,_({className:v("chakra-tabs",o),ref:m},T,{__css:l.root}),n))))}));y&&(h.displayName="Tabs");var j=o(((s,a)=>{var t=b(),m=r(_({},s,{ref:a})),l=_({outline:"0",display:"flex",alignItems:"center",justifyContent:"center"},t.tab);return e.createElement(u.button,_({},m,{className:v("chakra-tabs__tab",s.className),__css:l}))}));y&&(j.displayName="Tab");var E=o(((s,a)=>{var t=m(_({},s,{ref:a})),r=_({display:"flex"},b().tablist);return e.createElement(u.div,_({},t,{className:v("chakra-tabs__tablist",s.className),__css:r}))}));y&&(E.displayName="TabList");var k=o(((s,a)=>{var t=l(_({},s,{ref:a})),r=b();return e.createElement(u.div,_({outline:"0"},t,{className:v("chakra-tabs__tab-panel",s.className),__css:r.tabpanel}))}));y&&(k.displayName="TabPanel");var T=o(((s,a)=>{var t=i(s),r=b();return e.createElement(u.div,_({},t,{width:"100%",ref:a,className:v("chakra-tabs__tab-panels",s.className),__css:r.tabpanels}))}));y&&(T.displayName="TabPanels");var g=o(((s,a)=>{var t=n(),r=_({},s.style,t),m=b();return e.createElement(u.div,_({ref:a},s,{className:v("chakra-tabs__tab-indicator",s.className),style:r,__css:m.indicator}))}));y&&(g.displayName="TabIndicator");export{j as Tab,g as TabIndicator,E as TabList,k as TabPanel,T as TabPanels,h as Tabs};
//# sourceMappingURL=tabs.js.map
