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 { resetComponent, useEditorStyleRegister } from "../../../Hooks/useStyle";
var genStyle = function genStyle(token) {
    var playBoxSize = 28;
    var innerBoxSize = 24;
    return _define_property({}, token.componentCls, {
        display: 'flex',
        alignItems: 'center',
        gap: 8,
        '&-playBox': {
            display: 'flex',
            alignItems: 'center',
            justifyContent: 'center',
            width: playBoxSize,
            height: playBoxSize,
            cursor: 'pointer',
            borderRadius: 6,
            boxSizing: 'border-box'
        },
        '&-playBox:hover': {
            background: 'var(--color-gray-control-fill-hover)',
            borderRadius: 'var(--radius-control-base)',
            backdropFilter: 'blur(20px)',
            boxSizing: 'border-box'
        },
        '&-playingWrap': {
            display: 'flex',
            alignItems: 'center',
            justifyContent: 'space-between',
            borderRadius: 6,
            background: '#FFFFFF',
            boxShadow: 'var(--shadow-control-base)',
            width: 86,
            height: 28,
            padding: '2px'
        },
        '&-playingBox': {
            display: 'flex',
            alignItems: 'center',
            justifyContent: 'center',
            width: innerBoxSize,
            height: innerBoxSize,
            borderRadius: 6,
            cursor: 'pointer'
        },
        '&-playingBox:hover': {
            background: 'var(--color-gray-control-fill-hover)'
        },
        '&-rateBox': {
            display: 'flex',
            alignItems: 'center',
            justifyContent: 'space-between',
            padding: '6px 8px',
            width: 56,
            height: innerBoxSize,
            gap: 2,
            cursor: 'pointer',
            borderRadius: 6
        },
        '&-rateBox:hover': {
            background: 'var(--color-gray-control-fill-hover)'
        },
        '&-rateItem': {
            display: 'flex',
            alignItems: 'center',
            justifyContent: 'space-between',
            width: 90
        }
    });
};
export function useStyle(prefixCls) {
    return useEditorStyleRegister('VoiceButton', function(token) {
        var cls = prefixCls ? ".".concat(prefixCls) : "".concat(token.chatCls, "-voice-button");
        var proChatToken = _object_spread_props(_object_spread({}, token), {
            componentCls: cls
        });
        return [
            resetComponent(proChatToken),
            genStyle(proChatToken)
        ];
    });
}
