import ProfileNavigation from '@/components/profile-navigation'; import ContentManagementEntry from '@/components/content-management-entry'; 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', submitted: 'Submetido', in_review: 'Em análise', contacted: 'Contactado', reviewed: 'Revisto', qualification: 'Em qualificação', qualified: 'Qualificado', contact_accepted: 'Contacto aceite', referred: 'Encaminhado', due_diligence: 'Diligência devida', negotiation: 'Em negociação', pending: 'Pendente', refused: 'Recusado', converted: 'Convertido', cancelled: 'Cancelado', closed: 'Encerrado', draft: 'Rascunho', published: 'Publicado', archived: 'Arquivado', returned: 'Devolvida', approved: 'Aprovada internamente', suspended: 'Suspensa', needs_information: 'Correções solicitadas', information_pending: 'Aguarda parecer', rejected: 'Rejeitada', }; export function Management({ title, children, }: { title: string; children: ReactNode; }) { const { flash, educationEnabled, aiEnabled, auth, basePath } = usePage<{ auth?: { canManagePortal?: boolean }; basePath?: string; flash?: { success?: string; warning?: string }; educationEnabled?: boolean; aiEnabled?: boolean; }>().props; return (
{auth?.canManagePortal && basePath !== '/minhas-oportunidades' ? ( ) : ( )}

{title}

{flash?.success && (

{flash.success}

)} {flash?.warning && (

{flash.warning}

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