import { Ban, Globe, Moon, Sun, Users } from "lucide-react"; import { GradientIcon } from "~/components/ui/GradientIcon"; import { Input } from "~/components/ui/input"; import { Label } from "~/components/ui/label"; import { TimezoneSelect } from "~/components/league/TimezoneSelect"; import { cn } from "~/lib/utils"; export interface OvernightPauseSettingsProps { show: boolean; mode: "none" | "league" | "per_user"; onModeChange: (v: "none" | "league" | "per_user") => void; start: string; onStartChange: (v: string) => void; end: string; onEndChange: (v: string) => void; timezone: string; onTimezoneChange: (v: string) => void; commishTimezone?: string | null; disabled?: boolean; } const PAUSE_MODES = [ { value: "none" as const, icon: Ban, label: "No Pause", sub: "Timer always runs" }, { value: "league" as const, icon: Globe, label: "League", sub: "Same pause for everyone" }, { value: "per_user" as const, icon: Users, label: "Per Player", sub: "Pauses in each player's timezone" }, ]; export function OvernightPauseSettings({ show, mode, onModeChange, start, onStartChange, end, onEndChange, timezone, onTimezoneChange, commishTimezone, disabled, }: OvernightPauseSettingsProps) { if (!show) return null; return (
Each player's profile timezone is used. Players without one fall back to the timezone below. {!commishTimezone && ( <> You haven't set your timezone yet — set it in your profile.> )}
)}