Spaces:
Runtime error

File size: 3,219 Bytes
ad79323
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
import type { ReactNode } from "react";
import Link from "next/link";
import { JusticeScale01Icon } from "@hugeicons/core-free-icons";

import { AppLogo } from "@/components/shared/app-logo";
import { Icon } from "@/components/shared/icon";
import { Card, CardContent } from "@/components/ui/card";

type AuthShellProps = {
  eyebrow: string;
  title: string;
  description: string;
  alternateHref: string;
  alternateLabel: string;
  alternateAction: string;
  children: ReactNode;
};

export function AuthShell({
  eyebrow,
  title,
  description,
  alternateHref,
  alternateLabel,
  alternateAction,
  children,
}: AuthShellProps) {
  return (
    <main className="flex min-h-screen items-center justify-center px-4 py-10 sm:px-6">
      <div className="grid w-full max-w-6xl gap-6 lg:grid-cols-[0.95fr_1.05fr]">
        <Card className="overflow-hidden border-transparent bg-[linear-gradient(160deg,rgba(125,74,39,0.97),rgba(15,118,110,0.93))] text-white">
          <CardContent className="flex h-full flex-col justify-between gap-10 p-8 sm:p-10">
            <div className="space-y-8">
              <AppLogo className="[&_p]:text-white/70 [&_h1]:text-white" />
              <div className="space-y-4">
                <span className="inline-flex rounded-full border border-white/15 bg-white/10 px-4 py-2 text-sm font-semibold text-white/90">
                  {eyebrow}
                </span>
                <h1 className="text-4xl font-bold leading-[1.35]">{title}</h1>
                <p className="max-w-xl text-base leading-8 text-white/78 sm:text-lg">
                  {description}
                </p>
              </div>
            </div>

            <div className="rounded-[28px] border border-white/15 bg-white/10 p-5 backdrop-blur">
              <div className="flex items-start gap-4">
                <div className="flex h-12 w-12 items-center justify-center rounded-2xl bg-white/12">
                  <Icon icon={JusticeScale01Icon} size={24} className="text-white" />
                </div>
                <div className="space-y-2">
                  <h2 className="text-lg font-semibold">بداية مرتبة وواضحة</h2>
                  <p className="text-sm leading-7 text-white/72">
                    الواجهة دي معمولة للمحامين والفرق الصغيرة اللي محتاجة تدخل
                    بسرعة وتبدأ شغلها من غير تعقيد.
                  </p>
                </div>
              </div>
            </div>
          </CardContent>
        </Card>

        <Card className="bg-[color:rgba(255,250,244,0.92)]">
          <CardContent className="p-6 sm:p-8 lg:p-10">
            <div className="space-y-8">
              {children}
              <p className="text-center text-sm text-[var(--foreground-muted)]">
                {alternateLabel}{" "}
                <Link
                  href={alternateHref}
                  className="font-semibold text-[var(--primary)] hover:text-[var(--primary-strong)]"
                >
                  {alternateAction}
                </Link>
              </p>
            </div>
          </CardContent>
        </Card>
      </div>
    </main>
  );
}