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(token) {
    return _define_property({}, "".concat(token.componentCls), {
        padding: '0',
        '&-item': {
            display: 'flex',
            alignItems: 'flex-start',
            gap: '8px',
            margin: '12px 0',
            font: 'var(--font-text-h6-base)',
            color: 'var(--color-gray-text-default)'
        },
        '&-status': {
            display: 'flex',
            alignItems: 'center',
            justifyContent: 'center',
            flexShrink: 0,
            marginTop: '2px',
            fontSize: 16
        },
        '&-content': {
            flex: 1,
            minWidth: 0
        },
        '&-title': {
            fontSize: '14px',
            fontWeight: 400,
            lineHeight: '20px',
            color: 'var(--color-gray-text-default)',
            margin: 0,
            wordBreak: 'break-word'
        },
        '&-description': {
            font: 'var(--font-text-body-xs)',
            color: 'var(--color-gray-text-secondary)',
            marginTop: '4px',
            wordBreak: 'break-word'
        },
        // 为 error 和 pending 状态添加灰色字体
        '&-item-error, &-item-pending': _define_property({}, "".concat(token.componentCls, "-title"), {
            color: 'var(--color-gray-text-secondary)'
        })
    });
};
export function useTaskStyle(prefixCls) {
    return useEditorStyleRegister('WorkspaceTask', function(token) {
        var taskToken = _object_spread_props(_object_spread({}, token), {
            componentCls: ".".concat(prefixCls)
        });
        return [
            genStyle(taskToken)
        ];
    });
}
