import AdminResourceList from "@/app/features/AdminList/AdminResourceList";
import { MERCHANT_FIELDS } from "../constants";
import { IAddModalField } from "@/app/components/AddModal/types";

export default function GroupsPage() {
  return (
    <AdminResourceList
      title="Merchants"
      endpoint="/api/dashboard/admin/merchants"
      responseCollectionKeys={["merchants", "data", "items"]}
      primaryLabelKeys={["name", "merchantName", "title"]}
      chipKeys={["status", "role", "permissions"]}
      addModalFields={MERCHANT_FIELDS as IAddModalField[]}
      showEnabledToggle={true}
    />
  );
}
