import Button from "@/components/button";
import Sheet from "@/components/sheet/sheet";
import { useAuth } from "@/contexts/auth-context";
import { useSheet } from "@/hooks/use-sheet";
import { Text } from "@mantine/core";

const EnrollFreeAgent = () => {
  const { open, isOpen, toggle } = useSheet();
  const { user } = useAuth();
  return (
    <>
      <Button variant="subtle" size="sm" onClick={open}>
        Enroll As Free Agent
      </Button>

      <Sheet title="Free Agent Enrollment" opened={isOpen} onChange={toggle}>
        <Text size="md" mb="md">
          Enrolling as a free agent will enter you in a pool of players wanting to play but don't have a teammate yet.
        </Text>
        <Text size="sm" mb="md" c='dimmed'>
          You will be automatically paired with a partner before the tournament starts, and you will be able to see your new team and set a walkout song in the app.
        </Text>
        <Button onClick={console.log}>Confirm</Button>
      </Sheet>
    </>
  );
};

export default EnrollFreeAgent;
