"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react"),g=require("../../../../../@radix-ui_react-compose-refs@1.1.2_@types_react@19.2.8_react@19.2.3/node_modules/@radix-ui/react-compose-refs/dist/index.cjs.js"),f=require("react/jsx-runtime");function S(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const l=S(m);function b(e){const t=j(e),r=l.forwardRef((n,o)=>{const{children:i,...c}=n,s=l.Children.toArray(i),a=s.find(O);if(a){const u=a.props.children,y=s.map(p=>p===a?l.Children.count(u)>1?l.Children.only(null):l.isValidElement(u)?u.props.children:null:p);return f.jsx(t,{...c,ref:o,children:l.isValidElement(u)?l.cloneElement(u,void 0,y):null})}return f.jsx(t,{...c,ref:o,children:i})});return r.displayName=`${e}.Slot`,r}function j(e){const t=l.forwardRef((r,n)=>{const{children:o,...i}=r;if(l.isValidElement(o)){const c=C(o),s=R(i,o.props);return o.type!==l.Fragment&&(s.ref=n?g.composeRefs(n,c):c),l.cloneElement(o,s)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var d=Symbol("radix.slottable");function E(e){const t=({children:r})=>f.jsx(f.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=d,t}function O(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===d}function R(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...s)=>{const a=i(...s);return o(...s),a}:o&&(r[n]=o):n==="style"?r[n]={...o,...i}:n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}function C(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}exports.createSlot=b;exports.createSlottable=E;
//# sourceMappingURL=index.cjs.js.map
