'use client';
import{__rest as e}from"tslib";import t from"react";import{twMerge as o}from"tailwind-merge";import r from"../../../contexts/BaseColorContext.js";import"../../../contexts/HoveredValueContext.js";import"../../../contexts/RootStylesContext.js";import l from"../../../contexts/SelectedValueContext.js";import a from"../../../hooks/useInternalState.js";import{BaseColors as s}from"../../../lib/constants.js";import{border as i}from"../../../lib/shape.js";import{spacing as m}from"../../../lib/spacing.js";import{colorPalette as n,DEFAULT_COLOR as c}from"../../../lib/theme.js";import{getColorClassNames as u,makeClassName as f}from"../../../lib/utils.js";const p=f("TabList"),d=t.forwardRef(((f,d)=>{const{defaultValue:b,value:j,onValueChange:h,color:x=s.Blue,children:C,className:v}=f,V=e(f,["defaultValue","value","onValueChange","color","children","className"]),[g,w]=a(b,j);return t.createElement("div",Object.assign({ref:d,"aria-label":"Tabs",className:o(p("root"),"flex justify-start overflow-x-clip",u(c,n.lightBorder).borderColor,m.twoXl.spaceX,i.sm.bottom,v)},V),t.createElement(l.Provider,{value:{selectedValue:g,handleValueChange:e=>{null==h||h(e),w(e)}}},t.createElement(r.Provider,{value:x},t.Children.map(C,(e=>t.cloneElement(e))))))}));d.displayName="TabList";export{d as default};
