"use client";

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

export const AttendancePage = createSportsCenterListPage({
  title: "حضور و غیاب",
  breadcrumb: "حضور و غیاب",
  resourceKey: "attendanceRecords",
  api: sportsCenterApi.attendanceRecords,
  feature: "attendance_engine",
  createOnly: true,
  listQueryParam: "member_id",
  columns: [
    {
      "key": "kind",
      "header": "نوع"
    },
    {
      "key": "recorded_at",
      "header": "زمان",
      "type": "datetime"
    }
  ],
  createFields: [
    {
      "name": "sports_center_id",
      "label": "شناسه مرکز",
      "required": true
    },
    {
      "name": "member_id",
      "label": "عضو",
      "required": true
    }
  ],
});

export default AttendancePage;
