export function isToolbarLinkItem(item) {
    return typeof item.href === "string";
}
export function isValidToolbarItemShape(value) {
    if (!value || typeof value !== "object" || Array.isArray(value))
        return false;
    const item = value;
    if (typeof item.id !== "string" || item.id.trim().length === 0)
        return false;
    if (typeof item.label !== "string" || item.label.trim().length === 0)
        return false;
    if (item.ariaLabel !== undefined && typeof item.ariaLabel !== "string")
        return false;
    if (item.icon !== undefined && typeof item.icon !== "string")
        return false;
    if (item.tooltip !== undefined && typeof item.tooltip !== "string")
        return false;
    if (item.active !== undefined && typeof item.active !== "boolean")
        return false;
    if (item.disabled !== undefined && typeof item.disabled !== "boolean")
        return false;
    const hasHref = typeof item.href === "string";
    const hasOnClick = typeof item.onClick === "function";
    if (hasHref === hasOnClick)
        return false;
    if (hasHref)
        return true;
    return hasOnClick;
}
export function isInlineSvgIcon(icon) {
    return typeof icon === "string" && icon.trimStart().startsWith("<svg");
}
export function isExternalIconUrl(icon) {
    return typeof icon === "string" && icon.trimStart().startsWith("http");
}
//# sourceMappingURL=toolbar-items.js.map