"use client";

import { createExperienceListPage } from "@/modules/experience/components/ExperienceListCrudPage";
import { experienceApi } from "@/modules/experience/services/experience-api";

export const LayoutVersionsPage = createExperienceListPage({
  title: "نسخه‌های چیدمان",
  breadcrumb: "نسخه‌های چیدمان",
  resourceKey: "layoutVersions",
  permission: "experience.layouts.view",
  api: experienceApi.layoutVersions,
  columns: [
    { key: "code", header: "کد" },
    { key: "name", header: "نام" },
    { key: "status", header: "وضعیت", type: "status" },
    { key: "created_at", header: "ایجاد", type: "datetime" },
  ],
  createFields: [
    { name: "code", label: "کد", required: true },
    { name: "name", label: "نام", required: true },
    { name: "status", label: "وضعیت", type: "select", options: [
      { value: "draft", label: "پیش‌نویس" },
      { value: "active", label: "فعال" },
    ]},
  ],

});

export default LayoutVersionsPage;
