---
import { assertSecret, imgur, ImgurSize } from '@blitzkit/core';
import {
Cross1Icon,
DiscordLogoIcon,
GearIcon,
HamburgerMenuIcon,
} from '@radix-ui/react-icons';
import {
Box,
Code,
Flex,
Grid,
IconButton,
Link,
ScrollArea,
Separator,
Text,
} from '@radix-ui/themes';
import { BRANCH_NAMES } from '../constants/branches';
import { homeTool, TOOLS } from '../constants/tools';
import { PatreonIcon } from './PatreonIcon';
import { NavbarAccount } from './NavbarAccount';
const toolsFiltered = TOOLS.filter((tool) => !('href' in tool));
const tools = [homeTool, ...toolsFiltered];
const isBranchNamed =
import.meta.env.PUBLIC_ASSET_BRANCH &&
BRANCH_NAMES[import.meta.env.PUBLIC_ASSET_BRANCH];
---
BlitzKit
{
isBranchNamed && (
{BRANCH_NAMES[import.meta.env.PUBLIC_ASSET_BRANCH!]}
)
}
{
toolsFiltered.map((tool, index) => {
const unavailableOnBranch = tool.branches?.every(
(branch) =>
branch !== assertSecret(import.meta.env.PUBLIC_ASSET_BRANCH),
);
const selected = Astro.url.pathname.startsWith(
`/tools/${tool.id}`,
);
if (unavailableOnBranch) return null;
return (
{index > 0 && }
{tool.title}
);
})
}
{
tools.map((tool) => {
const unavailableOnBranch = tool.branches?.every(
(branch) =>
branch !== assertSecret(import.meta.env.PUBLIC_ASSET_BRANCH),
);
if (unavailableOnBranch) return null;
return (
{tool.title}
);
})
}