import { Command } from "cmdk";
import { FileText, GithubIcon, MessageSquare, Rocket } from "lucide-react";
// hooks
import { DiscordIcon } from "@plane/ui";
import { useApplication } from "@/hooks/store";
// ui
type Props = {
closePalette: () => void;
};
export const CommandPaletteHelpActions: React.FC<Props> = (props) => {
const { closePalette } = props;
const {
commandPalette: { toggleShortcutModal },
} = useApplication();
return (
<Command.Group heading="Help">
<Command.Item
onSelect={() => {
closePalette();
toggleShortcutModal(true);
}}
className="focus:outline-none"
>
<div className="flex items-center gap-2 text-custom-text-200">
<Rocket className="h-3.5 w-3.5" />
Open keyboard shortcuts
</div>
</Command.Item>
window.open("https://docs.plane.so/", "_blank");
<FileText className="h-3.5 w-3.5" />
Open Plane documentation
window.open("https://discord.com/invite/A92xrEGCge", "_blank");
<DiscordIcon className="h-4 w-4" color="rgb(var(--color-text-200))" />
Join our Discord
window.open("https://github.com/makeplane/plane/issues/new/choose", "_blank");
<GithubIcon className="h-4 w-4" color="rgb(var(--color-text-200))" />
Report a bug
(window as any)?.$crisp.push(["do", "chat:open"]);
<MessageSquare className="h-3.5 w-3.5" />
Chat with us
</Command.Group>
);