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 _object_spread(target) {
    for(var i = 1; i < arguments.length; i++){
        var source = arguments[i] != null ? arguments[i] : {};
        var ownKeys = Object.keys(source);
        if (typeof Object.getOwnPropertySymbols === "function") {
            ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
                return Object.getOwnPropertyDescriptor(source, sym).enumerable;
            }));
        }
        ownKeys.forEach(function(key) {
            _define_property(target, key, source[key]);
        });
    }
    return target;
}
function ownKeys(object, enumerableOnly) {
    var keys = Object.keys(object);
    if (Object.getOwnPropertySymbols) {
        var symbols = Object.getOwnPropertySymbols(object);
        if (enumerableOnly) {
            symbols = symbols.filter(function(sym) {
                return Object.getOwnPropertyDescriptor(object, sym).enumerable;
            });
        }
        keys.push.apply(keys, symbols);
    }
    return keys;
}
function _object_spread_props(target, source) {
    source = source != null ? source : {};
    if (Object.getOwnPropertyDescriptors) {
        Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
    } else {
        ownKeys(Object(source)).forEach(function(key) {
            Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
        });
    }
    return target;
}
import { resetComponent, useEditorStyleRegister } from "../../../../Hooks/useStyle";
var genStyle = function genStyle(token) {
    var _obj, _obj1;
    return _define_property({}, token.componentCls, (_obj1 = {
        padding: '12px 0',
        display: 'flex',
        gap: '8px',
        justifyContent: 'flex-start',
        alignItems: 'center',
        flexWrap: 'wrap'
    }, _define_property(_obj1, "".concat(token.componentCls, "-region-filter"), _define_property({
        display: 'flex',
        alignItems: 'center',
        gap: '8px'
    }, "".concat(token.componentCls, "-region-dropdown-btn"), _define_property({
        border: '1px solid #d9d9d9',
        borderRadius: '6px',
        backgroundColor: '#fff',
        color: '#666',
        fontSize: '14px',
        display: 'flex',
        alignItems: 'center',
        gap: '8px',
        minWidth: '80px',
        justifyContent: 'space-between',
        height: '32px',
        padding: '0 12px',
        '&:hover': _define_property({
            borderColor: '#8c8c8c',
            color: '#343a45',
            backgroundColor: '#f9f9f9'
        }, "".concat(token.componentCls, "-dropdown-icon"), {
            color: '#8c8c8c'
        })
    }, "".concat(token.componentCls, "-dropdown-icon"), {
        fontSize: '12px',
        color: '#666'
    }))), _define_property(_obj1, "".concat(token.componentCls, "-segmented-filter"), {
        backgroundColor: '#f5f5f5',
        height: '32px',
        display: 'flex',
        alignItems: 'center',
        borderRadius: '8px',
        '&.custom-segmented': {
            '.ant-segmented-item': {
                display: 'flex',
                alignItems: 'center',
                justifyContent: 'center',
                '.ant-segmented-item-label': {
                    fontFamily: 'PingFang SC',
                    fontSize: '13px',
                    fontWeight: 'normal',
                    lineHeight: '22px',
                    letterSpacing: '0em'
                }
            },
            '.ant-segmented-group': {
                height: '30px'
            },
            '.ant-segmented-item-selected': {
                borderRadius: '8px',
                backgroundColor: '#fff !important',
                border: '1px solid #d9d9d9 !important',
                boxShadow: '0px 0px 1px 0px rgba(0, 19, 41, 0.2), 0px 1.5px 4px -1px rgba(0, 19, 41, 0.04)',
                '.ant-segmented-item-label': {
                    fontFamily: 'PingFang SC',
                    fontSize: '13px',
                    fontWeight: 600,
                    lineHeight: '20px',
                    letterSpacing: '0em',
                    fontVariationSettings: '"opsz" auto',
                    /* gray/gray-文本-默认 */ /* 样式描述：--gray-a12 */ color: '#343a45 !important'
                }
            }
        }
    }), _define_property(_obj1, // Dark theme styles
    '&-dark', (_obj = {}, _define_property(_obj, "".concat(token.componentCls, "-region-filter"), _define_property({}, "".concat(token.componentCls, "-region-dropdown-btn"), _define_property({
        border: '1px solid #434343',
        backgroundColor: '#1a1a1a',
        color: 'rgba(255, 255, 255, 0.85)',
        '&:hover': _define_property({
            borderColor: '#595959',
            color: '#fff',
            backgroundColor: '#262626'
        }, "".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(_obj, "".concat(token.componentCls, "-segmented-filter"), {
        backgroundColor: '#262626',
        '&.custom-segmented': {
            '.ant-segmented-item': {
                '.ant-segmented-item-label': {
                    color: 'rgba(255, 255, 255, 0.65)'
                }
            },
            '.ant-segmented-item-selected': {
                backgroundColor: '#fff !important',
                border: '1px solid #434343 !important',
                '.ant-segmented-item-label': {
                    color: '#343a45 !important'
                }
            },
            '.ant-segmented-thumb': {
                backgroundColor: '#343a45 !important'
            }
        }
    }), _obj)), // Compact variant for toolbar integration
    _define_property(_obj1, '&-compact', {
        padding: '0',
        flexWrap: 'nowrap'
    }), _obj1));
};
/**
 * ChartFilter Style
 * @param prefixCls
 * @returns
 */ export function useStyle(prefixCls) {
    return useEditorStyleRegister('ChartFilter', function(token) {
        var chartFilterToken = _object_spread_props(_object_spread({}, token), {
            componentCls: ".".concat(prefixCls)
        });
        return [
            resetComponent(chartFilterToken),
            genStyle(chartFilterToken)
        ];
    });
}
