"use client";

import { createSportsCenterListPage } from "@/modules/sports-center/components/SportsCenterListCrudPage";
import { sportsCenterApi } from "@/modules/sports-center/services/sports-center-api";

export const FamiliesPage = createSportsCenterListPage({
  title: "خانواده‌ها",
  breadcrumb: "خانواده‌ها",
  resourceKey: "familyMembers",
  api: sportsCenterApi.familyMembers,
  readOnly: true,
  listQueryParam: "member_id",
  columns: [
    {
      "key": "display_name",
      "header": "نام"
    },
    {
      "key": "relationship",
      "header": "نسبت"
    }
  ],
  createFields: [
    {
      "name": "sports_center_id",
      "label": "شناسه مرکز",
      "required": true
    },
    {
      "name": "member_id",
      "label": "شناسه عضو",
      "required": true
    },
    {
      "name": "display_name",
      "label": "نام",
      "required": true
    }
  ],
});

export default FamiliesPage;
