1 "use client"
2
3 import clsx from "clsx"
4 import React from "react"
5 import { Tooltip } from "../../../Tooltip"
6 import { Link } from "../../../Link"
7 import { ShieldCheck, XMark } from "@medusajs/icons"
8 import { Button } from "../../../Button"
9 import { useAiAssistant } from "../../../../providers/AiAssistant"
10
11 export const AiAssistantChatWindowHeader = () => {
12 const { setChatOpened } = useAiAssistant()
13 return (
14 <div
15 className={clsx(
16 "flex gap-docs_0.5 items-center justify-between",
17 "w-full px-docs_1 py-docs_0.75 rounded-t-docs_sm",
18 "border-medusa-border-base border-b"
19 )}
20 >
21 <div className="flex gap-[6px] items-center">
22 <span className="text-h3 text-medusa-fg-base">Ask Bloom</span>
23 <Tooltip
24 tooltipChildren={
25 <>
26 This site is protected by reCAPTCHA and
27 <br />
28 the{" "}
29 <Link href="https://policies.google.com/privacy">
30 Google Privacy Policy
31 </Link>{" "}
32 and <Link href="https://policies.google.com/terms">ToS</Link>{" "}
33 apply
34 </>
35 }
36 clickable={true}
37 tooltipClassName={"!text-compact-small-plus"}
38 >
39 <ShieldCheck className="text-medusa-fg-muted" />
40 </Tooltip>
41 </div>
42 <Button
43 variant="transparent-clear"
44 className="!p-[6.5px] rounded-docs_sm"
45 onClick={() => setChatOpened(false)}
46 >
47 <XMark className="text-medusa-fg-muted" height={15} width={15} />
48 </Button>
49 </div>
50 )
51 }