"use client";

import { createDeliveryListPage } from "@/modules/delivery/components/DeliveryListCrudPage";
import { deliveryApi } from "@/modules/delivery/services/delivery-api";

export const ConfigurationsPage = createDeliveryListPage({
  title: "پیکربندی",
  breadcrumb: "پیکربندی",
  resourceKey: "configurations",
  permission: "delivery.configurations.view",
  api: deliveryApi.configurations,
  columns: [
    { key: "code", header: "کد" },
    { key: "name", header: "نام" },
    { key: "status", header: "وضعیت", type: "status" },
    { key: "created_at", header: "ایجاد", type: "datetime" },
  ],
  createFields: [
    { name: "organization_id", label: "سازمان", type: "organization", required: true },
    { name: "code", label: "کد", required: true },
  ],
});

export default ConfigurationsPage;
