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 _object_without_properties(source, excluded) {
    if (source == null) return {};
    var target = {}, sourceKeys, key, i;
    if (typeof Reflect !== "undefined" && Reflect.ownKeys) {
        sourceKeys = Reflect.ownKeys(source);
        for(i = 0; i < sourceKeys.length; i++){
            key = sourceKeys[i];
            if (excluded.indexOf(key) >= 0) continue;
            if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
            target[key] = source[key];
        }
        return target;
    }
    target = _object_without_properties_loose(source, excluded);
    if (Object.getOwnPropertySymbols) {
        sourceKeys = Object.getOwnPropertySymbols(source);
        for(i = 0; i < sourceKeys.length; i++){
            key = sourceKeys[i];
            if (excluded.indexOf(key) >= 0) continue;
            if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
            target[key] = source[key];
        }
    }
    return target;
}
function _object_without_properties_loose(source, excluded) {
    if (source == null) return {};
    var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
    for(i = 0; i < sourceKeys.length; i++){
        key = sourceKeys[i];
        if (excluded.indexOf(key) >= 0) continue;
        if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
        target[key] = source[key];
    }
    return target;
}
/** 桌面/通用：由 contentStyle 写入的容器内边距 */ export var CONTENT_PADDING_CSS_VAR = '--agentic-ui-content-padding';
/** 移动端优先的容器内边距（断点内注册默认值） */ export var CONTENT_PADDING_MOBILE_CSS_VAR = '--agentic-ui-content-padding-sm';
/** 宿主可覆盖：MarkdownEditor 容器移动端默认内边距 */ export var MOBILE_CONTENT_PADDING_CSS_VAR = '--agentic-ui-mobile-content-padding';
/** 宿主可覆盖：MarkdownInputField editor-content 移动端默认内边距 */ export var MOBILE_INPUT_FIELD_EDITOR_CONTENT_PADDING_CSS_VAR = '--agentic-ui-mobile-input-field-editor-content-padding';
/** MarkdownInputField editor-content 移动端 padding 变量 */ export var INPUT_FIELD_EDITOR_CONTENT_PADDING_MOBILE_CSS_VAR = '--agentic-ui-input-field-editor-content-padding-sm';
/** 移动端容器默认：4px（对齐 --padding-1x） */ export var MOBILE_CONTENT_PADDING_DEFAULT = "var(".concat(MOBILE_CONTENT_PADDING_CSS_VAR, ", var(--padding-1x, 4px))");
/** 移动端输入框 editor-content 默认：2px */ export var MOBILE_INPUT_FIELD_EDITOR_CONTENT_PADDING_DEFAULT = "var(".concat(MOBILE_INPUT_FIELD_EDITOR_CONTENT_PADDING_CSS_VAR, ", var(--padding-1x, 2px))");
export var DESKTOP_CONTENT_PADDING_FALLBACK = '4px 20px';
export function toContentPaddingCssVar(padding) {
    return _define_property({}, CONTENT_PADDING_CSS_VAR, typeof padding === 'number' ? "".concat(padding, "px") : padding);
}
/**
 * 将 contentStyle.padding 转为 CSS 变量 + var() 链，避免内联固定值压过移动端变量。
 */ export function resolveContainerContentStyle(contentStyle) {
    if (!contentStyle) return {};
    var padding = contentStyle.padding, rest = _object_without_properties(contentStyle, [
        "padding"
    ]);
    if (padding === undefined) return contentStyle;
    return _object_spread({}, rest, toContentPaddingCssVar(padding));
}
