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 { MOBILE_BREAKPOINT, MOBILE_PADDING } from "../Constants/mobile";
import { resetComponent, useEditorStyleRegister } from "../Hooks/useStyle";
var genStyle = function genStyle(token) {
    return _define_property({}, token.componentCls, _define_property({
        display: 'flex',
        flexDirection: 'column',
        height: '100%',
        width: '100%',
        position: 'relative',
        borderTopLeftRadius: 'var(--radius-xl)',
        borderTopRightRadius: 'var(--radius-xl)',
        borderBottomLeftRadius: 'var(--radius-xl)',
        borderBottomRightRadius: 'var(--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: 'var(--radius-xl)',
            borderTopRightRadius: 'var(--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: 'var(--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: 'var(--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: 'var(--color-gray-bg-active)'
                    }
                }
            }
        },
        '&-content': {
            position: 'relative',
            zIndex: 1,
            width: '100%',
            paddingBottom: 'var(--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: 'var(--color-gray-border-default)'
                    }
                },
                '> div': {
                    maxWidth: '800px',
                    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: 'var(--radius-xl)',
            borderBottomRightRadius: 'var(--radius-xl)'
        },
        '&-footer-background': {
            position: 'absolute',
            left: 0,
            right: 0,
            bottom: 0,
            width: '100%',
            height: 146,
            pointerEvents: 'none',
            overflow: 'hidden'
        }
    }, "@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 样式对象
 */ export function useStyle(prefixCls) {
    return useEditorStyleRegister('ChatLayout', function(token) {
        var chatLayoutToken = _object_spread_props(_object_spread({}, token), {
            componentCls: ".".concat(prefixCls)
        });
        return [
            resetComponent(chatLayoutToken),
            genStyle(chatLayoutToken)
        ];
    });
}
