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 { MOBILE_BREAKPOINT, MOBILE_PADDING } from "../Constants/mobile";
import { genStyleHooks, resetComponent } from "../Hooks/useStyle";
var RADIUS_XL = 'var(--radius-xl, var(--radius-chat-layout-footer, var(--radius-card-lg, 16px)))';
var COLOR_GRAY_BG_ACTIVE = 'var(--color-gray-bg-active, var(--color-gray-control-fill-active, rgba(20, 22, 28, 0.12)))';
var COLOR_GRAY_BORDER_DEFAULT = 'var(--color-gray-border-default, var(--color-gray-border-light, rgba(20, 22, 28, 0.12)))';
var genStyle = function genStyle(token) {
    return _define_property({}, token.componentCls, _define_property({
        display: 'flex',
        flexDirection: 'column',
        height: '100%',
        width: '100%',
        position: 'relative',
        borderTopLeftRadius: RADIUS_XL,
        borderTopRightRadius: RADIUS_XL,
        borderBottomLeftRadius: RADIUS_XL,
        borderBottomRightRadius: RADIUS_XL,
        backgroundColor: 'var(--color-gray-bg-page-light)',
        '&-header': {
            display: 'flex',
            alignItems: 'center',
            justifyContent: 'space-between',
            padding: '0 var(--padding-4x)',
            backgroundColor: 'var(--color-gray-bg-page-light)',
            minHeight: '48px',
            flexShrink: 0,
            zIndex: 10,
            borderTopLeftRadius: RADIUS_XL,
            borderTopRightRadius: RADIUS_XL,
            '&-left': {
                display: 'flex',
                alignItems: 'center',
                gap: 'var(--margin-2x)',
                '&-title': {
                    fontSize: 'var(--font-size-lg)',
                    fontWeight: 600,
                    color: 'var(--color-gray-text-default)',
                    margin: 0,
                    lineHeight: '1.4'
                },
                '&-collapse-btn': {
                    display: 'flex',
                    alignItems: 'center',
                    justifyContent: 'center',
                    width: 'var(--font-size-2xl)',
                    height: 'var(--font-size-2xl)',
                    borderRadius: '6px',
                    border: 'none',
                    backgroundColor: 'transparent',
                    color: 'var(--color-gray-text-secondary)',
                    cursor: 'pointer',
                    transition: 'all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1)',
                    padding: 0,
                    '&:hover': {
                        backgroundColor: 'var(--color-blue-control-fill-hover)',
                        color: 'var(--color-gray-text-default)'
                    },
                    '&:active': {
                        backgroundColor: COLOR_GRAY_BG_ACTIVE
                    }
                }
            },
            '&-right': {
                display: 'flex',
                alignItems: 'center',
                gap: 'var(--margin-2x)',
                '&-share-btn': {
                    display: 'flex',
                    alignItems: 'center',
                    justifyContent: 'center',
                    padding: '0 8px',
                    height: 'var(--font-size-2xl)',
                    borderRadius: '6px',
                    border: 'none',
                    backgroundColor: 'transparent',
                    color: 'var(--color-gray-text-secondary)',
                    cursor: 'pointer',
                    transition: 'all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1)',
                    '&:hover': {
                        backgroundColor: 'var(--color-blue-control-fill-hover)',
                        color: 'var(--color-gray-text-default)'
                    },
                    '&:active': {
                        backgroundColor: COLOR_GRAY_BG_ACTIVE
                    }
                },
                '&-collapse-btn': {
                    display: 'flex',
                    alignItems: 'center',
                    justifyContent: 'center',
                    width: 'var(--font-size-2xl)',
                    height: 'var(--font-size-2xl)',
                    borderRadius: '6px',
                    border: 'none',
                    backgroundColor: 'transparent',
                    color: 'var(--color-gray-text-secondary)',
                    cursor: 'pointer',
                    transition: 'all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1)',
                    padding: 0,
                    '&:hover': {
                        backgroundColor: 'var(--color-blue-control-fill-hover)',
                        color: 'var(--color-gray-text-default)'
                    },
                    '&:active': {
                        backgroundColor: COLOR_GRAY_BG_ACTIVE
                    }
                }
            }
        },
        '&-content': {
            position: 'relative',
            zIndex: 1,
            width: '100%',
            paddingBottom: RADIUS_XL,
            flex: 1,
            overflow: 'hidden',
            display: 'flex',
            flexDirection: 'column',
            '&-scrollable': {
                flex: 1,
                overflowY: 'auto',
                overflowX: 'hidden',
                paddingTop: 'var(--padding-2x)',
                paddingLeft: 'var(--padding-2x)',
                paddingRight: 'var(--padding-2x)',
                '&::-webkit-scrollbar': {
                    width: '6px'
                },
                '&::-webkit-scrollbar-track': {
                    backgroundColor: 'transparent'
                },
                '&::-webkit-scrollbar-thumb': {
                    backgroundColor: 'var(--color-gray-border-light)',
                    borderRadius: '3px',
                    '&:hover': {
                        backgroundColor: COLOR_GRAY_BORDER_DEFAULT
                    }
                },
                '> div': {
                    maxWidth: 'var(--agentic-chat-layout-content-max-width, 980px)',
                    margin: '0 auto'
                }
            }
        },
        '&-footer': {
            display: 'flex',
            flexDirection: 'column',
            alignItems: 'center',
            justifyContent: 'center',
            width: '100%',
            paddingTop: 8,
            paddingBottom: 24,
            gap: 24,
            position: 'absolute',
            bottom: 0,
            zIndex: 100,
            borderBottomLeftRadius: RADIUS_XL,
            borderBottomRightRadius: RADIUS_XL,
            '--radius-xl': '12px'
        },
        '&-footer-background': {
            position: 'absolute',
            left: 0,
            right: 0,
            bottom: 0,
            width: '100%',
            height: 146,
            pointerEvents: 'none',
            overflow: 'hidden',
            borderRadius: 'inherit'
        }
    }, "@media (max-width: ".concat(MOBILE_BREAKPOINT, ")"), {
        '&-header': {
            padding: "0 ".concat(MOBILE_PADDING)
        },
        '&-content': {
            '&-scrollable': {
                paddingTop: MOBILE_PADDING,
                paddingLeft: MOBILE_PADDING,
                paddingRight: MOBILE_PADDING
            }
        },
        '&-footer': {
            padding: MOBILE_PADDING
        }
    }));
};
/**
 * ChatLayout 样式 Hook
 * @param prefixCls 组件类名前缀
 * @returns 样式对象
 */ var useGenStyle = genStyleHooks('ChatLayout', 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 : 'ChatLayout'), 2), wrapSSR = _useGenStyle[0], hashId = _useGenStyle[1];
    return {
        wrapSSR: wrapSSR,
        hashId: hashId
    };
}
