'use client';'use strict';

var chunkDXR4VEAI_cjs = require('./chunk-DXR4VEAI.cjs');
var s = require('@radix-ui/react-tabs');
var recipes = require('@onbeam/styled-system/recipes');
var css = require('@onbeam/styled-system/css');
var react = require('react');
var utils = require('@onbeam/utils');
var react$1 = require('motion/react');
var jsxRuntime = require('react/jsx-runtime');

function _interopNamespace(e) {
	if (e && e.__esModule) return e;
	var n = Object.create(null);
	if (e) {
		Object.keys(e).forEach(function (k) {
			if (k !== 'default') {
				var d = Object.getOwnPropertyDescriptor(e, k);
				Object.defineProperty(n, k, d.get ? d : {
					enumerable: true,
					get: function () { return e[k]; }
				});
			}
		});
	}
	n.default = e;
	return Object.freeze(n);
}

var s__namespace = /*#__PURE__*/_interopNamespace(s);

var S=react.forwardRef(({className:e,...o},r)=>jsxRuntime.jsx(s__namespace.Root,{ref:r,className:css.cx(recipes.tabs().root,e),...o})),k=s__namespace.Content,w=({tabComponent:e="button",value:o,href:r,children:i,className:l,layoutId:b="tabsListLayoutId",equalTabWidth:n,...a})=>{let p=react.useRef(null),[R,m]=react.useState(!1),T=recipes.tabs();react.useEffect(()=>{m(p.current?.getAttribute("data-state")==="active");},[]);let x=react.useCallback(v=>{m(v==="active");},[]);return utils.useAttributeObserver(p,["data-state"],x),jsxRuntime.jsx(s__namespace.Trigger,{className:css.cx("group",T.trigger,l),value:o,...a,ref:p,asChild:!0,"data-equal-width":n,children:jsxRuntime.jsxs(e,{href:r,children:[R&&jsxRuntime.jsx(react$1.motion.div,{layoutId:b,className:T.indicator,"aria-hidden":!0}),jsxRuntime.jsx("span",{className:T.triggerText,children:i})]})})},B=({className:e,items:o,tabComponent:r,equalTabWidth:i,...l})=>{let b=react.useId(),n=recipes.tabs();return jsxRuntime.jsx(s__namespace.List,{className:css.cx(recipes.gridBackground(),n.triggerRoot,e),...l,children:jsxRuntime.jsxs(chunkDXR4VEAI_cjs.b,{children:[jsxRuntime.jsx("div",{className:n.list,"data-equal-width":i,children:o.map(a=>jsxRuntime.jsx(w,{value:a.value,href:a.href,layoutId:b,tabComponent:r,equalTabWidth:i,children:a.content},a.value))}),jsxRuntime.jsx(chunkDXR4VEAI_cjs.c,{})]})})};

exports.a = S;
exports.b = k;
exports.c = B;
//# sourceMappingURL=out.js.map
//# sourceMappingURL=chunk-AH2WA2GK.cjs.map