import { manager } from "@openremote/core";
import { getMapRoute } from "./routes";
export function headerItemMap(orApp) {
    return {
        icon: "map",
        href: getMapRoute(),
        text: "map"
    };
}
export function headerItemAssets(orApp) {
    return {
        icon: "rhombus-split",
        href: "assets",
        text: "asset_plural",
    };
}
export function headerItemServices(orApp) {
    return {
        icon: "puzzle",
        href: "services",
        text: "services",
        roles: ["read:services"]
    };
}
export function headerItemRules(orApp) {
    return {
        icon: "state-machine",
        href: "rules",
        text: "rule_plural",
        hideMobile: true,
        roles: () => !manager.isRestrictedUser()
    };
}
export function headerItemInsights(orApp) {
    return {
        icon: "chart-areaspline",
        href: "insights",
        text: "insights"
    };
}
export function headerItemGatewayConnection(orApp) {
    return {
        icon: "cloud",
        value: "gateway",
        href: "gateway",
        text: "gatewayConnection",
        roles: ["write:admin", "read:admin"]
    };
}
export function headerItemGatewayTunnel(orApp) {
    return {
        icon: "lan-connect",
        value: "gateway-tunnel",
        href: "gateway-tunnel",
        text: "gatewayTunnel",
        roles: ["write:admin", "read:admin"]
    };
}
export function headerItemLanguage(orApp) {
    return {
        icon: "web",
        value: "language",
        text: "language",
        action: () => {
            orApp.showLanguageModal();
        }
    };
}
export function headerItemLogout(orApp) {
    return {
        icon: "logout",
        value: "logout",
        text: "logout",
        action: () => {
            orApp.logout();
        }
    };
}
export function headerItemLogs(orApp) {
    return {
        icon: "text-box-search-outline",
        value: "logs",
        href: "logs",
        text: "logs",
        hideMobile: true,
        roles: ["write:logs", "read:logs"]
    };
}
export function headerItemAccount(orApp) {
    return {
        icon: "account",
        value: "account",
        href: "account",
        text: "account",
        roles: ["write:user"]
    };
}
export function headerItemUsers(orApp) {
    return {
        icon: "account-group",
        value: "users",
        href: "users",
        text: "user_plural",
        roles: ["read:admin", "write:admin"]
    };
}
export function headerItemRoles(orApp) {
    return {
        icon: "account-box-multiple",
        value: "roles",
        href: "roles",
        text: "role_plural",
        roles: ["read:admin", "write:admin"]
    };
}
export function headerItemRealms(orApp) {
    return {
        icon: "domain",
        value: "realms",
        href: "realms",
        text: "realm_plural",
        roles: () => manager.isSuperUser()
    };
}
export function headerItemExport(orApp) {
    return {
        icon: "database-export",
        value: "export",
        href: "data-export",
        text: "dataExport"
    };
}
export function headerItemProvisioning(orApp) {
    return {
        icon: "cellphone-cog",
        value: "provisioning",
        href: "provisioning",
        text: "autoProvisioning",
        roles: () => manager.isSuperUser()
    };
}
export function headerItemConfiguration(orApp) {
    return {
        icon: "palette-outline",
        value: "configuration",
        href: "configuration",
        text: "appearance",
        roles: () => manager.isSuperUser()
    };
}
//# sourceMappingURL=headers.js.map