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 genStyle(token) {
    var _obj, _obj1, _obj2, _obj3, _obj4, _obj5, _obj6, _obj7;
    return _define_property({}, "".concat(token.componentCls), (_obj7 = {}, _define_property(_obj7, "&-container", {
        display: 'flex',
        flexDirection: 'column',
        height: '100%'
    }), _define_property(_obj7, "&-header", (_obj3 = {
        display: 'flex',
        alignItems: 'center',
        justifyContent: 'space-between',
        padding: '8px 12px',
        marginLeft: '-12px',
        marginRight: '-12px',
        borderBottom: '1px solid var(--color-gray-border-light)'
    }, // 返回按钮
    _define_property(_obj3, "&-back-button", {
        display: 'flex',
        alignItems: 'center',
        justifyContent: 'center',
        width: '32px',
        height: '32px',
        border: 'none',
        background: 'none',
        cursor: 'pointer',
        color: 'var(--color-gray-text-secondary)',
        transition: 'all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1)',
        borderRadius: 'var(--radius-control-base)',
        backdropFilter: 'blur(20px)',
        '&:hover': {
            background: 'var(--color-gray-control-fill-active)'
        }
    }), // 返回图标
    _define_property(_obj3, "&-back-icon", {
        fontSize: '16px'
    }), _define_property(_obj3, "&-with-border", {
        borderBottom: '1px solid rgba(20, 22, 28, 0.07)'
    }), _define_property(_obj3, "&-with-back", _define_property({}, "".concat(token.componentCls, "-header-icon"), (_obj = {}, _define_property(_obj, "&--html", {
        width: '16px',
        height: '16px',
        background: 'transparent'
    }), _define_property(_obj, "&--default", {
        width: '16px',
        height: '16px',
        background: 'transparent'
    }), _obj))), _define_property(_obj3, "&-left", {
        display: 'flex',
        alignItems: 'center',
        gap: '8px',
        flex: 1,
        minWidth: 0,
        overflow: 'hidden'
    }), _define_property(_obj3, "&-icon", (_obj1 = {
        display: 'flex',
        alignItems: 'center',
        justifyContent: 'center',
        borderRadius: '6px',
        fontSize: token.fontSizeHeading3
    }, _define_property(_obj1, "&--html", {
        width: '40px',
        height: '40px',
        color: 'var(--color-blue-text-default)',
        background: 'linear-gradient(180deg, rgba(0, 181, 253, 0.15), rgba(0, 181, 253, 0.08))'
    }), _define_property(_obj1, "&--md", {
        width: '40px',
        height: '40px',
        color: 'var(--color-orange-text-default)',
        background: 'linear-gradient(180deg, rgba(35, 214, 220, 0.15), rgba(35, 214, 220, 0.08))'
    }), _define_property(_obj1, "&--default", {
        width: '40px',
        height: '40px',
        background: 'linear-gradient(180deg, var(--color-gray-bg-page-light), var(--color-gray-bg-page))'
    }), _obj1)), _define_property(_obj3, "&-content", {
        display: 'flex',
        alignItems: 'center',
        gap: '12px',
        minWidth: 0
    }), _define_property(_obj3, "&-title-wrapper", {
        display: 'flex',
        flexDirection: 'column',
        gap: '-4px',
        flex: 1,
        minWidth: 0
    }), _define_property(_obj3, "&-title", {
        display: 'flex',
        alignItems: 'center',
        gap: '4px',
        fontFamily: 'AlibabaPuHuiTi',
        fontSize: '14px',
        fontWeight: '500',
        lineHeight: '22px',
        letterSpacing: 'normal',
        color: 'var(--color-gray-text-default)'
    }), _define_property(_obj3, "&-subtitle", {
        fontSize: 'var(--font-size-sm)',
        fontWeight: 'normal',
        color: 'var(--color-gray-text-secondary)',
        font: 'var(--font-text-body-sm)',
        letterSpacing: 'var(--letter-spacing-body-sm, normal)',
        gridColumn: '1 / span 2',
        display: 'block',
        maxWidth: '100%',
        whiteSpace: 'nowrap',
        overflow: 'hidden',
        textOverflow: 'ellipsis'
    }), _define_property(_obj3, "&-right", (_obj2 = {
        display: 'flex',
        alignItems: 'center'
    }, _define_property(_obj2, "".concat(token.antCls, "-segmented"), {
        borderRadius: 'var(--radius-control-base)'
    }), _define_property(_obj2, "".concat(token.antCls, "-segmented-item-selected "), {
        borderRadius: 'var(--radius-control-base)'
    }), _obj2)), // Segmented 右侧额外内容容器
    _define_property(_obj3, "&-segmented-right", {
        display: 'flex',
        alignItems: 'center',
        justifyContent: 'center',
        gap: '8px'
    }), _obj3)), _define_property(_obj7, "&--shell", (_obj4 = {
        height: 'calc(100% + 16px)',
        paddingTop: 0,
        paddingBottom: 0,
        margin: '0 -12px -16px'
    }, _define_property(_obj4, "".concat(token.componentCls, "-header"), {
        marginBottom: 0,
        marginLeft: 0,
        marginRight: 0
    }), _define_property(_obj4, "".concat(token.componentCls, "-content"), _define_property({
        width: 'unset',
        margin: 0,
        flex: 1,
        background: 'var(--color-gray-text-default)',
        '.ace-container': {
            borderRadius: 'unset'
        },
        '.ace-tm': {
            color: 'rgba(255, 255, 255, 0.27)',
            background: 'transparent'
        },
        '.ace_gutter': {
            color: 'rgba(255, 255, 255, 0.45)',
            font: 'var(--font-text-code-base)',
            letterSpacing: 'var(--letter-spacing-code-base, normal)',
            background: 'transparent'
        },
        '.ace_gutter-cell': {
            paddingLeft: 12
        },
        '.ace-tm .ace_gutter': {
            background: 'transparent'
        },
        '.ace-tm .ace_gutter-active-line': {
            color: 'var(--color-gray-bg-card-white)',
            background: 'transparent'
        },
        '.ace-tm .ace_comment': {
            color: 'rgba(255, 255, 255, 0.27)'
        },
        '.ace-tm .ace_keyword': {
            color: 'var(--color-sub5-text-default)'
        },
        '.ace_identifier, .ace_paren': {
            color: 'var(--color-gray-bg-card-white)'
        },
        '.ace-tm .ace_constant.ace_numeric': {
            color: 'var(--color-green-text-default)'
        },
        '.code-editor-container': {
            marginTop: 0,
            marginBottom: 0,
            maxHeight: '100%',
            background: 'transparent !important',
            border: 'none',
            boxShadow: 'none'
        },
        '.code-editor-content': {
            padding: 0,
            background: 'transparent'
        }
    }, "".concat(token.antCls, "-empty-description"), {
        color: 'var(--color-gray-text-light)'
    })), _obj4)), _define_property(_obj7, "&--markdown", _define_property({}, "".concat(token.antCls, '-agentic-md-editor-content div[data-be="paragraph"]:last-child'), {
        paddingBottom: '16px',
        color: 'var(--color-gray-text-light)',
        font: 'var(--font-text-code-base)',
        letterSpacing: 'var(--letter-spacing-code-base, normal)'
    })), _define_property(_obj7, "&-content", (_obj5 = {
        position: 'relative',
        width: 'auto',
        height: 'calc(100% - 72px)',
        overflow: 'auto',
        margin: '0 -12px'
    }, _define_property(_obj5, "".concat(token.antCls, "-workspace-html-preview-content"), {
        '.ace-container': {
            border: 'unset',
            borderRadius: 'unset',
            boxShadow: 'unset'
        },
        '.ace_gutter-cell': {
            paddingLeft: 12
        },
        '.code-editor-container': {
            maxHeight: '100%',
            borderRadius: 'var(--radius-card-base)',
            '.code-editor-content': {
                padding: '0!important',
                '.ace_gutter': {
                    color: 'var(--color-gray-text-light)',
                    font: 'var(--font-text-code-base)',
                    letterSpacing: 'var(--letter-spacing-code-base, normal)',
                    background: 'var(--color-gray-bg-card-white)'
                },
                '.ace-tm .ace_scroller .ace_content': {
                    fontFamily: 'Roboto Mono'
                },
                '.ace-tm .ace_gutter-active-line': {
                    color: 'var(--color-gray-text-default)',
                    background: 'var(--color-gray-control-fill-hover)'
                },
                '.ace-tm .ace_marker-layer .ace_active-line': {
                    background: 'var(--color-gray-control-fill-hover)'
                },
                '.ace_cursor': {
                    display: 'none !important'
                }
            }
        }
    }), _define_property(_obj5, '.code-editor-container', {
        position: 'relative',
        borderRadius: 'var(--radius-card-base)',
        background: 'var(--color-gray-bg-card-white)',
        transition: 'border-color 0.2s ease-in-out',
        boxSizing: 'border-box',
        overflow: 'hidden',
        '.ace-github': {
            background: 'transparent'
        }
    }), _obj5)), _define_property(_obj7, "&-overlay", (_obj6 = {
        position: 'absolute',
        inset: 0,
        display: 'flex',
        alignItems: 'center',
        justifyContent: 'center',
        zIndex: 1
    }, _define_property(_obj6, "&--loading", {
        background: 'rgba(255, 255, 255, 0.6)'
    }), _define_property(_obj6, "&--error", {
        background: 'rgba(255, 245, 245, 0.6)',
        color: 'var(--color-red-text-default)'
    }), _obj6)), _define_property(_obj7, "&-empty", {
        display: 'flex',
        alignItems: 'center',
        justifyContent: 'center',
        height: '100%',
        minHeight: '240px',
        padding: '24px',
        textAlign: 'center'
    }), _obj7));
};
export function useRealtimeFollowStyle(prefixCls) {
    return useEditorStyleRegister('WorkspaceRealtimeFollow', function(token) {
        var realtimeToken = _object_spread_props(_object_spread({}, token), {
            componentCls: ".".concat(prefixCls)
        });
        return [
            genStyle(realtimeToken)
        ];
    });
}
