"use client";
import { Select } from "@/components/ui/select";
import type { SelectOption } from "@/components/ui/select";
import { useState } from "react";
const currencies: SelectOption[] = [
{ value: "usd", label: "USD", leading: <span aria-hidden="true">πΊπΈ</span> },
{ value: "eur", label: "EUR", leading: <span aria-hidden="true">πͺπΊ</span> },
{ value: "gbp", label: "GBP", leading: <span aria-hidden="true">π¬π§</span> },
{ value: "jpy", label: "JPY", leading: <span aria-hidden="true">π―π΅</span> },
];
const categories: SelectOption[] = [
{ value: "subscriptions", label: "Subscriptions", hint: "Recurring charges" },
{ value: "invoices", label: "Invoices", hint: "One-off bills" },
{ value: "reports", label: "Reports", hint: "Monthly summaries" },
];
export default function SelectDemo() {
const [currency, setCurrency] = useState("usd");
const [category, setCategory] = useState("subscriptions");
return (
<div className="flex min-h-[220px] w-full flex-wrap items-center justify-center gap-6 bg-background p-10 text-foreground">
<Select
options={currencies}
value={currency}
onValueChange={setCurrency}
label="Currency"
variant="pill"
/>
<Select
options={categories}
value={category}
onValueChange={setCategory}
label="Category"
variant="field"
/>
</div>
);
}