import { jsx as _jsx } from "react/jsx-runtime";
import { SidebarItem } from "@vertesia/ui/layout";
import { useUserPermissions } from "./UserPermissionsProvider";
export function SecureSidebarItem({ permission, ...others }) {
    const perms = useUserPermissions();
    const hasPermission = perms.hasPermission(permission);
    if (!hasPermission) {
        return null;
    }
    else {
        return (_jsx(SidebarItem, { ...others }));
    }
}
//# sourceMappingURL=SecureSidebarItem.js.map