"use client";

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

export const TeamsPage = createSportsCenterListPage({
  title: "تیم‌ها",
  breadcrumb: "تیم‌ها",
  resourceKey: "competitionTeams",
  api: sportsCenterApi.competitionTeams,
  feature: "competition_management",
  createOnly: true,
  listQueryParam: "competition_id",
  columns: [
    {
      "key": "name",
      "header": "نام"
    }
  ],
  createFields: [
    {
      "name": "sports_center_id",
      "label": "شناسه مرکز",
      "required": true
    },
    {
      "name": "competition_id",
      "label": "مسابقه",
      "required": true
    },
    {
      "name": "name",
      "label": "نام",
      "required": true
    }
  ],
});

export default TeamsPage;
