'use strict';

var jsxRuntime = require('../../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.cjs');
var reactIcons_esm = require('../../node_modules/.pnpm/@radix-ui_react-icons@1.3.0_react@18.2.0/node_modules/@radix-ui/react-icons/dist/react-icons.esm.cjs');
var index$2 = require('../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.cjs');
var React = require('react');
var flex = require('../flex/flex.cjs');
var selectRoot = require('./select-root.cjs');
var select_module = require('./select.module.css.cjs');
var index = require('../../node_modules/.pnpm/@radix-ui_react-select@2.2.5_@types_react-dom@18.0.11_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-select/dist/index.cjs');
var index$1 = require('../../node_modules/.pnpm/@radix-ui_react-slot@1.2.3_@types_react@18.2.12_react@18.2.0/node_modules/@radix-ui/react-slot/dist/index.cjs');

const trigger = index$2.cva(select_module.default.trigger, {
    variants: {
        size: {
            small: select_module.default['trigger-small'],
            medium: select_module.default['trigger-medium']
        },
        variant: {
            outline: select_module.default['trigger-outline'],
            text: select_module.default['trigger-text']
        }
    },
    defaultVariants: {
        size: 'medium',
        variant: 'outline'
    }
});
const SelectTrigger = React.forwardRef(({ size, variant, className, children, iconProps = {}, asChild, 'aria-label': ariaLabel, ...props }, ref) => {
    const { multiple, autocomplete } = selectRoot.useSelectContext();
    return (jsxRuntime.jsxRuntimeExports.jsxs(index.Trigger, { "data-multiselectable": multiple ? true : undefined, ref: ref, className: trigger({ size, variant, className }), "aria-label": ariaLabel || 'Select option', "aria-haspopup": autocomplete ? 'dialog' : 'listbox', ...props, children: [jsxRuntime.jsxRuntimeExports.jsx(flex.Flex, { className: select_module.default.triggerContent, align: 'center', gap: 2, children: asChild ? jsxRuntime.jsxRuntimeExports.jsx(index$1.Root, { children: children }) : children }), jsxRuntime.jsxRuntimeExports.jsx(index.Icon, { asChild: true, children: jsxRuntime.jsxRuntimeExports.jsx(reactIcons_esm.ChevronDownIcon, { className: select_module.default.triggerIcon, "aria-hidden": 'true', ...iconProps }) })] }));
});
SelectTrigger.displayName = index.Trigger.displayName;

exports.SelectTrigger = SelectTrigger;
//# sourceMappingURL=select-trigger.cjs.map
