function _array_like_to_array(arr, len) {
    if (len == null || len > arr.length) len = arr.length;
    for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
    return arr2;
}
function _array_with_holes(arr) {
    if (Array.isArray(arr)) return arr;
}
function _define_property(obj, key, value) {
    if (key in obj) {
        Object.defineProperty(obj, key, {
            value: value,
            enumerable: true,
            configurable: true,
            writable: true
        });
    } else {
        obj[key] = value;
    }
    return obj;
}
function _iterable_to_array_limit(arr, i) {
    var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
    if (_i == null) return;
    var _arr = [];
    var _n = true;
    var _d = false;
    var _s, _e;
    try {
        for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
            _arr.push(_s.value);
            if (i && _arr.length === i) break;
        }
    } catch (err) {
        _d = true;
        _e = err;
    } finally{
        try {
            if (!_n && _i["return"] != null) _i["return"]();
        } finally{
            if (_d) throw _e;
        }
    }
    return _arr;
}
function _non_iterable_rest() {
    throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
function _sliced_to_array(arr, i) {
    return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
}
function _unsupported_iterable_to_array(o, minLen) {
    if (!o) return;
    if (typeof o === "string") return _array_like_to_array(o, minLen);
    var n = Object.prototype.toString.call(o).slice(8, -1);
    if (n === "Object" && o.constructor) n = o.constructor.name;
    if (n === "Map" || n === "Set") return Array.from(n);
    if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
}
import { genStyleHooks, resetComponent } from "../../../../Hooks/useStyle";
var genStyle = function genStyle(token) {
    var antCls = token.antCls;
    var _obj, _obj1, _obj2, _obj3;
    return _define_property({}, token.componentCls, (_obj3 = {
        padding: '12px 0',
        display: 'flex',
        gap: '8px',
        justifyContent: 'flex-start',
        alignItems: 'center',
        flexWrap: 'wrap'
    }, _define_property(_obj3, "".concat(token.componentCls, "-region-filter"), _define_property({
        display: 'flex',
        alignItems: 'center',
        gap: '8px'
    }, "".concat(token.componentCls, "-region-dropdown-btn"), _define_property({
        border: '1px solid var(--color-gray-border-light)',
        borderRadius: '6px',
        backgroundColor: 'var(--color-gray-bg-card-white)',
        color: 'var(--color-gray-text-secondary)',
        fontSize: '14px',
        display: 'flex',
        alignItems: 'center',
        gap: '8px',
        minWidth: '80px',
        justifyContent: 'space-between',
        height: '32px',
        padding: '0 12px',
        '&:hover': _define_property({
            borderColor: 'var(--color-gray-text-light)',
            color: 'var(--color-gray-text-default)',
            backgroundColor: 'var(--color-gray-bg-page-light)'
        }, "".concat(token.componentCls, "-dropdown-icon"), {
            color: 'var(--color-gray-text-light)'
        })
    }, "".concat(token.componentCls, "-dropdown-icon"), {
        fontSize: '12px',
        color: 'var(--color-gray-text-secondary)'
    }))), _define_property(_obj3, "".concat(token.componentCls, "-segmented-filter"), {
        backgroundColor: 'var(--color-gray-control-fill-hover)',
        height: '32px',
        display: 'flex',
        alignItems: 'center',
        borderRadius: '8px',
        '&.custom-segmented': (_obj = {}, _define_property(_obj, "".concat(antCls, "-segmented-item"), _define_property({
            display: 'flex',
            alignItems: 'center',
            justifyContent: 'center'
        }, "".concat(antCls, "-segmented-item-label"), {
            fontFamily: 'PingFang SC',
            fontSize: '13px',
            fontWeight: 'normal',
            lineHeight: '22px',
            letterSpacing: '0em'
        })), _define_property(_obj, "".concat(antCls, "-segmented-group"), {
            height: '30px'
        }), _define_property(_obj, "".concat(antCls, "-segmented-item-selected"), _define_property({
            borderRadius: '8px',
            backgroundColor: 'var(--color-gray-bg-card-white) !important',
            border: '1px solid var(--color-gray-border-light) !important',
            boxShadow: '0px 0px 1px 0px rgba(0, 19, 41, 0.2), 0px 1.5px 4px -1px rgba(0, 19, 41, 0.04)'
        }, "".concat(antCls, "-segmented-item-label"), {
            fontFamily: 'PingFang SC',
            fontSize: '13px',
            fontWeight: 600,
            lineHeight: '20px',
            letterSpacing: '0em',
            fontVariationSettings: '"opsz" auto',
            /* gray/gray-文本-默认 */ /* 样式描述：--gray-a12 */ color: 'var(--color-gray-text-default) !important'
        })), _obj)
    }), _define_property(_obj3, // Dark theme styles
    '&-dark', (_obj2 = {}, _define_property(_obj2, "".concat(token.componentCls, "-region-filter"), _define_property({}, "".concat(token.componentCls, "-region-dropdown-btn"), _define_property({
        border: '1px solid var(--color-gray-border-dark)',
        backgroundColor: 'var(--color-gray-bg-page-dark)',
        color: 'rgba(255, 255, 255, 0.85)',
        '&:hover': _define_property({
            borderColor: 'var(--color-gray-text-light)',
            color: 'var(--color-gray-bg-card-white)',
            backgroundColor: 'var(--color-gray-bg-page-dark)'
        }, "".concat(token.componentCls, "-dropdown-icon"), {
            color: 'rgba(255, 255, 255, 0.8)'
        })
    }, "".concat(token.componentCls, "-dropdown-icon"), {
        color: 'rgba(255, 255, 255, 0.65)'
    }))), _define_property(_obj2, "".concat(token.componentCls, "-segmented-filter"), {
        backgroundColor: 'var(--color-gray-bg-page-dark)',
        '&.custom-segmented': (_obj1 = {}, _define_property(_obj1, "".concat(antCls, "-segmented-item"), _define_property({}, "".concat(antCls, "-segmented-item-label"), {
            color: 'rgba(255, 255, 255, 0.65)'
        })), _define_property(_obj1, "".concat(antCls, "-segmented-item-selected"), _define_property({
            backgroundColor: 'var(--color-gray-bg-card-white) !important',
            border: '1px solid var(--color-gray-border-dark) !important'
        }, "".concat(antCls, "-segmented-item-label"), {
            color: 'var(--color-gray-text-default) !important'
        })), _define_property(_obj1, "".concat(antCls, "-segmented-thumb"), {
            backgroundColor: 'var(--color-gray-bg-page-dark) !important'
        }), _obj1)
    }), _obj2)), // Compact variant for toolbar integration
    _define_property(_obj3, '&-compact', {
        padding: '0',
        flexWrap: 'nowrap'
    }), _obj3));
};
/**
 * ChartFilter Style
 * @param prefixCls
 * @returns
 */ var useGenStyle = genStyleHooks('ChartFilter', function(token, info) {
    return [
        resetComponent(token),
        genStyle(token, info)
    ];
});
export function useStyle(prefixCls) {
    var _useGenStyle = _sliced_to_array(useGenStyle(prefixCls !== null && prefixCls !== void 0 ? prefixCls : 'ChartFilter'), 2), wrapSSR = _useGenStyle[0], hashId = _useGenStyle[1];
    return {
        wrapSSR: wrapSSR,
        hashId: hashId
    };
}
