"use client";

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

export const RoutingEnginesPage = createDeliveryListPage({
  title: "موتورهای مسیریابی",
  breadcrumb: "موتورهای مسیریابی",
  resourceKey: "routingEngines",
  permission: "delivery.routing_engines.view",
  api: deliveryApi.routingEngines,
  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 },
    { name: "name", label: "نام", required: true },
  ],
});

export default RoutingEnginesPage;
