| 1 | import { usesChatGptSharing } from "@t3tools/shared/usageLimits"; |
| 2 | import type { ServerProvider } from "@t3tools/contracts"; |
| 3 | import { OpenAI } from "../Icons"; |
| 4 | import { ChatGptUsageButton } from "../settings/ChatGptUsageButton"; |
| 5 | |
| 6 | export function ChatGptSharingControl({ provider }: { provider: ServerProvider | null }) { |
| 7 | if (!usesChatGptSharing(provider)) return null; |
| 8 | return ( |
| 9 | <div className="flex items-center justify-between gap-4 border-t px-3 py-2"> |
| 10 | <span className="flex items-center gap-2 text-xs text-muted-foreground"> |
| 11 | <OpenAI className="size-3.5" aria-hidden="true" /> |
| 12 | Using ChatGPT plan |
| 13 | </span> |
| 14 | <ChatGptUsageButton size="xs" /> |
| 15 | </div> |
| 16 | ); |
| 17 | } |