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 } from "../Hooks/useStyle";
var genStyle = function genStyle(token) {
    var _obj, _obj1, _obj2;
    return _define_property({}, token.componentCls, (_obj2 = {
        height: '100%',
        borderRadius: 'var(--radius-modal-base)',
        background: 'var(--color-gray-bg-card-white)',
        border: '1px solid rgba(140, 171, 255, 0.12)',
        boxShadow: 'var(--shadow-card-base)',
        'svg.sofa-icons-icon > g': {
            clipPath: 'none!important'
        }
    }, // 纯净模式样式
    _define_property(_obj2, "&".concat(token.componentCls, "-pure"), {
        borderRadius: '0',
        background: 'transparent',
        border: 'none',
        boxShadow: 'none',
        height: '100%'
    }), _define_property(_obj2, "".concat(token.componentCls, "-header"), {
        display: 'flex',
        alignItems: 'center',
        justifyContent: 'space-between',
        margin: 'var(--margin-3x) var(--margin-4x)'
    }), _define_property(_obj2, "".concat(token.componentCls, "-title"), {
        font: 'var(--font-text-h5-base)',
        color: 'var(--color-gray-text-default)',
        letterSpacing: 'var(--letter-spacing-h5-base, normal)'
    }), _define_property(_obj2, "".concat(token.componentCls, "-header-right"), _define_property({
        display: 'flex',
        alignItems: 'center',
        justifyContent: 'flex-end',
        gap: 'var(--gap-2x, var(--margin-2x))'
    }, "".concat(token.componentCls, "-close"), {
        cursor: 'pointer',
        transition: 'all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1)'
    })), _define_property(_obj2, "".concat(token.componentCls, "-tabs"), {
        margin: 'var(--margin-3x)'
    }), _define_property(_obj2, "".concat(token.componentCls, "-segmented"), (_obj1 = {}, _define_property(_obj1, "".concat(token.antCls, "-segmented-group"), {
        height: '32px'
    }), _define_property(_obj1, "&".concat(token.antCls, "-segmented:not(.chaos-segmented) ").concat(token.antCls, "-segmented-item ").concat(token.antCls, "-segmented-item-label"), {
        height: '100%',
        display: 'flex',
        alignItems: 'center',
        justifyContent: 'center'
    }), _define_property(_obj1, "".concat(token.antCls, "-segmented-item"), _define_property({}, "&:has(".concat(token.antCls, "-segmented-item-label:empty)"), (_obj = {
        display: 'flex',
        alignItems: 'center',
        justifyContent: 'center',
        flex: '0 0 auto !important',
        height: '100%',
        width: '8px',
        padding: '4px 0',
        margin: '0 2px',
        cursor: 'default',
        pointerEvents: 'none',
        backgroundColor: 'transparent !important'
    }, _define_property(_obj, "".concat(token.antCls, "-segmented-item-label"), {
        padding: '0',
        height: '100%',
        width: '1px',
        backgroundColor: 'var(--color-gray-border-light)'
    }), _define_property(_obj, '&:hover', {
        backgroundColor: 'transparent !important'
    }), _obj))), _define_property(_obj1, "".concat(token.antCls, "-segmented-item-disabled"), _define_property({}, "&:has(".concat(token.antCls, "-segmented-item-label:empty)"), {
        opacity: '1 !important'
    })), _obj1)), _define_property(_obj2, "".concat(token.componentCls, "-tab-item"), {
        display: 'flex',
        alignItems: 'center',
        justifyContent: 'center',
        gap: '4px'
    }), _define_property(_obj2, "".concat(token.componentCls, "-tab-title"), {
        fontSize: 'var(--font-size-base)',
        fontWeight: 500
    }), _define_property(_obj2, "".concat(token.componentCls, "-tab-count"), {
        display: 'inline-flex',
        alignItems: 'center',
        justifyContent: 'center',
        minWidth: '20px',
        height: '20px',
        padding: '4px 6px',
        marginLeft: '4px',
        color: 'var(--color-gray-text-secondary)',
        font: 'var(--font-text-number-xs)',
        letterSpacing: 'var(--letter-spacing-number-xs, normal)',
        backgroundColor: 'var(--color-gray-control-fill-active)',
        borderRadius: '200px',
        boxSizing: 'border-box',
        '--workspace-tab-count-digit-distance': '8px',
        '--workspace-tab-count-digit-blur': '2px',
        '--workspace-tab-count-digit-dur': '500ms',
        '--workspace-tab-count-digit-stagger': '70ms',
        '--workspace-tab-count-digit-ease': 'cubic-bezier(0.34, 1.45, 0.64, 1)'
    }), _define_property(_obj2, "".concat(token.componentCls, "-tab-count-digits"), {
        display: 'inline-flex',
        alignItems: 'baseline'
    }), _define_property(_obj2, "".concat(token.componentCls, "-tab-count-digit"), {
        display: 'inline-block',
        willChange: 'transform, opacity, filter'
    }), _define_property(_obj2, "".concat(token.componentCls, "-tab-count-digits--animating ").concat(token.componentCls, "-tab-count-digit"), {
        animationName: "".concat(token.componentCls, "-tabCountDigitPopIn"),
        animationDuration: 'var(--workspace-tab-count-digit-dur)',
        animationTimingFunction: 'var(--workspace-tab-count-digit-ease)',
        animationFillMode: 'both'
    }), _define_property(_obj2, "@keyframes ".concat(token.componentCls, "-tabCountDigitPopIn"), {
        '0%': {
            transform: 'translate(0, var(--workspace-tab-count-digit-distance))',
            opacity: 0,
            filter: 'blur(var(--workspace-tab-count-digit-blur))'
        },
        '100%': {
            transform: 'translate(0, 0)',
            opacity: 1,
            filter: 'blur(0)'
        }
    }), _define_property(_obj2, '@media (prefers-reduced-motion: reduce)', _define_property({}, "".concat(token.componentCls, "-tab-count-digit"), {
        animation: 'none !important',
        animationDelay: '0ms !important'
    })), _define_property(_obj2, "".concat(token.componentCls, "-content"), {
        height: 'calc(100% - 95px)',
        padding: '0 12px 16px',
        display: 'flex',
        flexDirection: 'column',
        minHeight: 0,
        overflowX: 'hidden',
        overflowY: 'auto',
        borderRadius: 'var(--radius-card-base)'
    }), _obj2));
};
var useGenStyle = genStyleHooks('Workspace', genStyle);
export function useWorkspaceStyle(prefixCls) {
    var _useGenStyle = _sliced_to_array(useGenStyle(prefixCls !== null && prefixCls !== void 0 ? prefixCls : 'Workspace'), 2), wrapSSR = _useGenStyle[0], hashId = _useGenStyle[1];
    return {
        wrapSSR: wrapSSR,
        hashId: hashId
    };
}
