summaryrefslogtreecommitdiffhomepage
path: root/packages/console/app/src/routes/black/common.tsx
blob: 8932a967e4d3120f6908f890c50ca69932a2cf24 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import { Match, Switch } from "solid-js"
import { useI18n } from "~/context/i18n"

export const plans = [
  { id: "20", multiplier: null },
  { id: "100", multiplier: "black.plan.multiplier100" },
  { id: "200", multiplier: "black.plan.multiplier200" },
] as const

export type PlanID = (typeof plans)[number]["id"]
export type Plan = (typeof plans)[number]

export function PlanIcon(props: { plan: string }) {
  const i18n = useI18n()

  return (
    <Switch>
      <Match when={props.plan === "20"}>
        <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
          <title>{i18n.t("black.plan.icon20")}</title>
          <rect x="0.5" y="0.5" width="23" height="23" stroke="currentColor" />
        </svg>
      </Match>
      <Match when={props.plan === "100"}>
        <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
          <title>{i18n.t("black.plan.icon100")}</title>
          <rect x="0.5" y="0.5" width="9" height="9" stroke="currentColor" />
          <rect x="0.5" y="14.5" width="9" height="9" stroke="currentColor" />
          <rect x="14.5" y="0.5" width="9" height="9" stroke="currentColor" />
          <rect x="14.5" y="14.5" width="9" height="9" stroke="currentColor" />
        </svg>
      </Match>
      <Match when={props.plan === "200"}>
        <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
          <title>{i18n.t("black.plan.icon200")}</title>
          <rect x="0.5" y="0.5" width="3" height="3" stroke="currentColor" />
          <rect x="0.5" y="5.5" width="3" height="3" stroke="currentColor" />
          <rect x="0.5" y="10.5" width="3" height="3" stroke="currentColor" />
          <rect x="0.5" y="15.5" width="3" height="3" stroke="currentColor" />
          <rect x="0.5" y="20.5" width="3" height="3" stroke="currentColor" />
          <rect x="5.5" y="0.5" width="3" height="3" stroke="currentColor" />
          <rect x="5.5" y="5.5" width="3" height="3" stroke="currentColor" />
          <rect x="5.5" y="10.5" width="3" height="3" stroke="currentColor" />
          <rect x="5.5" y="15.5" width="3" height="3" stroke="currentColor" />
          <rect x="5.5" y="20.5" width="3" height="3" stroke="currentColor" />
          <rect x="10.5" y="0.5" width="3" height="3" stroke="currentColor" />
          <rect x="10.5" y="5.5" width="3" height="3" stroke="currentColor" />
          <rect x="10.5" y="10.5" width="3" height="3" stroke="currentColor" />
          <rect x="10.5" y="15.5" width="3" height="3" stroke="currentColor" />
          <rect x="10.5" y="20.5" width="3" height="3" stroke="currentColor" />
          <rect x="15.5" y="0.5" width="3" height="3" stroke="currentColor" />
          <rect x="15.5" y="5.5" width="3" height="3" stroke="currentColor" />
          <rect x="15.5" y="10.5" width="3" height="3" stroke="currentColor" />
          <rect x="15.5" y="15.5" width="3" height="3" stroke="currentColor" />
          <rect x="15.5" y="20.5" width="3" height="3" stroke="currentColor" />
          <rect x="20.5" y="0.5" width="3" height="3" stroke="currentColor" />
          <rect x="20.5" y="5.5" width="3" height="3" stroke="currentColor" />
          <rect x="20.5" y="10.5" width="3" height="3" stroke="currentColor" />
          <rect x="20.5" y="15.5" width="3" height="3" stroke="currentColor" />
          <rect x="20.5" y="20.5" width="3" height="3" stroke="currentColor" />
        </svg>
      </Match>
    </Switch>
  )
}