/** Namespace สำหรับ Table-related types */ export namespace PropsTable { /** Interface สำหรับ pagination object */ export interface Pagination { /** หน้าปัจจุบัน (เริ่มจาก 1) */ page: number; /** จำนวนแถวต่อหน้า */ rowsPerPage: number; /** จำนวนแถวทั้งหมด */ rowsNumber?: number; /** คอลัมน์ที่ใช้ sort */ sortBy?: string; /** เรียงจากมากไปน้อย */ descending?: boolean; rowsTotal?: number; } /** Interface สำหรับ request props จาก d-table */ export interface RequestProps { /** ข้อมูล pagination */ pagination: Pagination; /** ตัวกรองข้อมูล */ filter?: any; /** function สำหรับดึงค่าจาก cell */ getCellValue?: (col: any, row: any) => any; } /** Union type สำหรับ handleRequest function */ export type HandleRequestProps = RequestProps; } // Export แบบเดิมเพื่อ backward compatibility export type TablePagination = PropsTable.Pagination; export type TableRequestProps = PropsTable.RequestProps; export type HandleRequestProps = PropsTable.HandleRequestProps;