|
| 1 | +import type { ComponentType } from "react"; |
| 2 | +import TablerBan from "~icons/tabler/ban"; |
| 3 | +import TablerUserCheck from "~icons/tabler/user-check"; |
| 4 | +import TablerConfetti from "~icons/tabler/confetti"; |
| 5 | +import TablerClockPause from "~icons/tabler/clock-pause"; |
| 6 | +import TablerHourglassFilled from "~icons/tabler/hourglass-filled"; |
| 7 | +import TablerPointFilled from "~icons/tabler/point-filled"; |
| 8 | +import TablerId from "~icons/tabler/id"; |
| 9 | +import TablerSettings2 from "~icons/tabler/settings-2"; |
| 10 | +import TablerCalendarCheck from "~icons/tabler/calendar-check"; |
| 11 | + |
| 12 | +type ApplicationStatus = { |
| 13 | + [k: string]: { |
| 14 | + className: string; |
| 15 | + text: string; |
| 16 | + icon?: ComponentType<React.SVGProps<SVGSVGElement>>; |
| 17 | + }; |
| 18 | +}; |
| 19 | + |
| 20 | +const defineStatus = <const T extends ApplicationStatus>(status: T) => { |
| 21 | + return status; |
| 22 | +}; |
| 23 | + |
| 24 | +const applicationStatus = defineStatus({ |
| 25 | + rejected: { |
| 26 | + className: "bg-badge-bg-rejected text-badge-text-rejected", |
| 27 | + text: "Rejected", |
| 28 | + icon: TablerBan, |
| 29 | + }, |
| 30 | + attending: { |
| 31 | + className: "bg-badge-bg-attending text-badge-text-attending", |
| 32 | + text: "Attending", |
| 33 | + icon: TablerUserCheck, |
| 34 | + }, |
| 35 | + accepted: { |
| 36 | + className: "bg-badge-bg-accepted text-badge-text-accepted", |
| 37 | + text: "Accepted", |
| 38 | + icon: TablerConfetti, |
| 39 | + }, |
| 40 | + waitlisted: { |
| 41 | + className: "bg-badge-bg-waitlisted text-badge-text-waitlisted", |
| 42 | + text: "Waitlisted", |
| 43 | + icon: TablerClockPause, |
| 44 | + }, |
| 45 | + underReview: { |
| 46 | + className: "bg-badge-bg-underReview text-badge-text-underReview", |
| 47 | + text: "Under Review", |
| 48 | + icon: TablerHourglassFilled, |
| 49 | + }, |
| 50 | + notApplied: { |
| 51 | + className: "bg-badge-bg-notApplied text-badge-text-notApplied", |
| 52 | + text: "Not Applied", |
| 53 | + icon: TablerPointFilled, |
| 54 | + }, |
| 55 | + staff: { |
| 56 | + className: "bg-badge-bg-staff text-badge-text-staff", |
| 57 | + text: "Staff", |
| 58 | + icon: TablerId, |
| 59 | + }, |
| 60 | + admin: { |
| 61 | + className: "bg-badge-bg-admin text-badge-text-admin", |
| 62 | + text: "Admin", |
| 63 | + icon: TablerSettings2, |
| 64 | + }, |
| 65 | + notGoing: { |
| 66 | + className: "bg-badge-bg-notGoing text-badge-text-notGoing", |
| 67 | + text: "Not Going", |
| 68 | + icon: TablerBan, |
| 69 | + }, |
| 70 | + completed: { |
| 71 | + className: "bg-badge-bg-completed text-badge-text-completed", |
| 72 | + text: "Completed", |
| 73 | + icon: TablerCalendarCheck, |
| 74 | + }, |
| 75 | +}); |
| 76 | + |
| 77 | +export default applicationStatus; |
0 commit comments