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 { useEditorStyleRegister } from "../Hooks/useStyle";
var genStyle = function(token) {
    var _obj;
    return _define_property({}, token.componentCls, (_obj = {
        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(_obj, "&".concat(token.componentCls, "-pure"), {
        borderRadius: '0',
        background: 'transparent',
        border: 'none',
        boxShadow: 'none',
        height: '100%'
    }), _define_property(_obj, "".concat(token.componentCls, "-header"), {
        display: 'flex',
        alignItems: 'center',
        justifyContent: 'space-between',
        margin: 'var(--margin-3x) var(--margin-4x)'
    }), _define_property(_obj, "".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(_obj, "".concat(token.componentCls, "-header-right"), _define_property({
        display: 'flex',
        alignItems: 'center',
        justifyContent: 'flex-end',
        gap: 'var(--gap-2x)'
    }, "".concat(token.componentCls, "-close"), {
        cursor: 'pointer',
        transition: 'all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1)'
    })), _define_property(_obj, "".concat(token.componentCls, "-tabs"), {
        margin: 'var(--margin-3x)'
    }), // 分割线样式
    _define_property(_obj, "".concat(token.componentCls, "-segmented"), {
        '.ant-segmented-group': {
            height: '32px'
        },
        '&.ant-segmented:not(.chaos-segmented) .ant-segmented-item .ant-segmented-item-label': {
            height: '100%',
            display: 'flex',
            alignItems: 'center',
            justifyContent: 'center'
        },
        '.ant-segmented-item': {
            '&:has(.ant-segmented-item-label:empty)': {
                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',
                '.ant-segmented-item-label': {
                    padding: '0',
                    height: '100%',
                    width: '1px',
                    backgroundColor: 'var(--color-gray-border-light)'
                },
                '&:hover': {
                    backgroundColor: 'transparent !important'
                }
            }
        },
        '.ant-segmented-item-disabled': {
            '&:has(.ant-segmented-item-label:empty)': {
                opacity: '1 !important'
            }
        }
    }), _define_property(_obj, "".concat(token.componentCls, "-tab-item"), {
        display: 'flex',
        alignItems: 'center',
        justifyContent: 'center',
        gap: '4px'
    }), _define_property(_obj, "".concat(token.componentCls, "-tab-title"), {
        fontSize: 'var(--font-size-base)',
        fontWeight: 500
    }), _define_property(_obj, "".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'
    }), _define_property(_obj, "".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)'
    }), _obj));
};
export function useWorkspaceStyle(prefixCls) {
    return useEditorStyleRegister('Workspace', function(token) {
        var workspaceToken = _object_spread_props(_object_spread({}, token), {
            componentCls: ".".concat(prefixCls)
        });
        return [
            genStyle(workspaceToken)
        ];
    });
}
