import {
RiArrowRightLine,
RiArrowUpDoubleLine,
RiAtLine,
RiAttachmentLine,
RiBarChartBoxLine,
RiBarcodeLine,
RiBillLine,
RiExchangeLine,
RiGroupLine,
RiLineChartLine,
RiNumbersLine,
RiPieChartLine,
RiRefreshLine,
RiStore3Line,
RiTodoLine,
RiWallet3Line,
} from "@remixicon/react";
import Link from "next/link";
import type { ReactNode } from "react";
import { AttachmentsWidget } from "@/features/dashboard/components/widgets/attachments-widget";
import { BillWidget } from "@/features/dashboard/components/widgets/bill-widget";
import { CategoryTrendsWidget } from "@/features/dashboard/components/widgets/category-trends-widget";
import { ExpensesByCategoryWidgetWithChart } from "@/features/dashboard/components/widgets/expenses-by-category-widget-with-chart";
import { GoalsProgressWidget } from "@/features/dashboard/components/widgets/goals-progress-widget";
import { InboxWidget } from "@/features/dashboard/components/widgets/inbox-widget";
import { IncomeByCategoryWidgetWithChart } from "@/features/dashboard/components/widgets/income-by-category-widget-with-chart";
import { IncomeExpenseBalanceWidget } from "@/features/dashboard/components/widgets/income-expense-balance-widget";
import { InstallmentExpensesWidget } from "@/features/dashboard/components/widgets/installment-expenses-widget";
import { InvoicesWidget } from "@/features/dashboard/components/widgets/invoices-widget";
import { MyAccountsWidget } from "@/features/dashboard/components/widgets/my-accounts-widget";
import { NotesWidget } from "@/features/dashboard/components/widgets/notes-widget";
import { PayersWidget } from "@/features/dashboard/components/widgets/payers-widget";
import { PaymentOverviewWidget } from "@/features/dashboard/components/widgets/payment-overview-widget";
import { PaymentStatusWidget } from "@/features/dashboard/components/widgets/payment-status-widget";
import { PurchasesByCategoryWidget } from "@/features/dashboard/components/widgets/purchases-by-category-widget";
import { RecurringExpensesWidget } from "@/features/dashboard/components/widgets/recurring-expenses-widget";
import { SpendingOverviewWidget } from "@/features/dashboard/components/widgets/spending-overview-widget";
import type { WidgetPreferences } from "@/features/dashboard/widget-registry/widget-actions";
import type { SelectOption } from "@/features/transactions/components/types";
import type { DashboardData } from "../fetch-dashboard-data";
export type DashboardWidgetQuickActionOptions = {
payerOptions: SelectOption[];
splitPayerOptions: SelectOption[];
defaultPayerId: string | null;
accountOptions: SelectOption[];
cardOptions: SelectOption[];
categoryOptions: SelectOption[];
estabelecimentos: string[];
};
export type WidgetConfig = {
id: string;
title: string;
subtitle: string;
icon: ReactNode;
component: (props: {
data: DashboardData;
period: string;
adminPayerSlug: string | null;
widgetPreferences: WidgetPreferences;
quickActionOptions: DashboardWidgetQuickActionOptions;
onMyAccountsShowExcludedChange?: (value: boolean) => void;
}) => ReactNode;
action?: ReactNode;
};
export const widgetsConfig: WidgetConfig[] = [
{
id: "my-accounts",
title: "Minhas Contas",
subtitle: "Saldo consolidado disponível",
icon: ,
component: ({
data,
period,
widgetPreferences,
onMyAccountsShowExcludedChange,
}) => (
),
},
{
id: "invoices",
title: "Faturas",
subtitle: "Resumo das faturas do período",
icon: ,
component: ({ data }) => (
),
},
{
id: "boletos",
title: "Boletos",
subtitle: "Controle de boletos do período",
icon: ,
component: ({ data }) => ,
},
{
id: "payment-status",
title: "Status de Pagamento",
subtitle: "Valores confirmados e pendentes",
icon: ,
component: ({ data }) => (
),
},
{
id: "inbox",
title: "Pré-lançamentos",
subtitle: "Notificações pendentes de revisão",
icon: ,
component: ({ data, quickActionOptions }) => (
),
action: (
Revisar
),
},
{
id: "income-expense-balance",
title: "Receita, Despesa e Balanço",
subtitle: "Últimos 6 meses",
icon: ,
component: ({ data }) => (
),
},
{
id: "goals-progress",
title: "Progresso de Orçamentos",
subtitle: "Orçamentos por categoria no período",
icon: ,
component: ({ data }) => (
),
action: (
Ver todos
),
},
{
id: "category-trends",
title: "Tendências de Categorias",
subtitle: "Top 10 maiores variações vs. mês anterior",
icon: ,
component: ({ data }) => (
),
},
{
id: "spending-overview",
title: "Panorama de Gastos",
subtitle: "Principais despesas e frequência por local",
icon: ,
component: ({ data }) => (
),
},
{
id: "payment-overview",
title: "Comportamento de Pagamento",
subtitle: "Despesas por condição e forma de pagamento",
icon: ,
component: ({ data, period, adminPayerSlug }) => (
),
},
{
id: "expenses-by-category",
title: "Categorias por Despesas",
subtitle: "Distribuição de despesas por categoria",
icon: ,
component: ({ data, period }) => (
),
},
{
id: "income-by-category",
title: "Categorias por Receitas",
subtitle: "Distribuição de receitas por categoria",
icon: ,
component: ({ data, period }) => (
),
},
{
id: "purchases-by-category",
title: "Lançamentos por Categorias",
subtitle: "Distribuição de lançamentos por categoria",
icon: ,
component: ({ data }) => (
),
},
{
id: "recurring-expenses",
title: "Lançamentos Recorrentes",
subtitle: "Despesas recorrentes do período",
icon: ,
component: ({ data }) => (
),
},
{
id: "installment-expenses",
title: "Lançamentos Parcelados",
subtitle: "Acompanhe as parcelas abertas",
icon: ,
component: ({ data }) => (
),
},
{
id: "pagadores",
title: "Pessoas",
subtitle: "Despesas por pessoa no período",
icon: ,
component: ({ data }) => (
),
action: (
Ver todos
),
},
{
id: "notes",
title: "Anotações",
subtitle: "Últimas anotações ativas",
icon: ,
component: ({ data }) => ,
action: (
Ver todas
),
},
{
id: "attachments",
title: "Anexos",
subtitle: "Comprovantes do período",
icon: ,
component: ({ data }) => (
),
action: (
Ver todos
),
},
];