'use client';
import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
import React from 'react';
import { XIcon } from '../../../icons/X/index.js';
import './index.scss';
const baseClass = 'clear-indicator';
export const ClearIndicator = (props)=>{
    const { clearValue, innerProps: { ref, ...restInnerProps } } = props;
    return /*#__PURE__*/ _jsxDEV("div", {
        className: baseClass,
        // TODO Fix this - Broke with React 19 types
        ref: typeof ref === 'string' ? null : ref,
        ...restInnerProps,
        onKeyDown: (e)=>{
            if (e.key === 'Enter') {
                clearValue();
                e.stopPropagation();
            }
        },
        role: "button",
        tabIndex: 0,
        children: /*#__PURE__*/ _jsxDEV(XIcon, {
            className: `${baseClass}__icon`
        }, void 0, false, {
            fileName: "src/elements/ReactSelect/ClearIndicator/index.tsx",
            lineNumber: 34,
            columnNumber: 7
        }, this)
    }, void 0, false, {
        fileName: "src/elements/ReactSelect/ClearIndicator/index.tsx",
        lineNumber: 20,
        columnNumber: 5
    }, this);
};

//# sourceMappingURL=index.js.map