import { Head, Link, usePage } from "@inertiajs/react"; import type { ReactNode } from "react"; import { cloneElement, isValidElement, useId } from "react"; export type Paginated = { data: T[]; total: number; current_page: number; last_page: number; prev_page_url: string | null; next_page_url: string | null; }; export const control = "w-full rounded-md border border-input bg-background p-2 text-foreground"; export const button = "inline-flex items-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground disabled:opacity-50"; export const states: Record = { received: "Recebido", in_review: "Em análise", contacted: "Contactado", closed: "Encerrado", draft: "Rascunho", published: "Publicado", archived: "Arquivado", }; export function Management({ title, children }: { title: string; children: ReactNode }) { const { flash, educationEnabled, aiEnabled } = usePage<{ flash?: { success?: string }; educationEnabled?: boolean; aiEnabled?: boolean; }>().props; return (

{title}

{flash?.success && (

{flash.success}

)} {children}
); } export function Pagination({ page }: { page: Paginated }) { return ( ); } export function Field({ label, error, children, }: { label: string; error?: string; children: ReactNode; }) { const id = useId(); return ( ); }