import type { CommentStatus, Lang } from "../types/comment-types-types";

export const ROWS_PER_PAGE = 10;
export const ROW_HEIGHT = 70;
export const FIXED_BODY_HEIGHT = ROW_HEIGHT * ROWS_PER_PAGE;
export const TABLE_COLUMNS =
    "58px minmax(205px, 0.9fr) 145px minmax(230px, 1.2fr) 120px 165px 96px";

export const TEXT = {
    en: {
        title: "User Comments",
        subtitle: "View user comments and manage comment status",
        totalComments: "Total Comments",
        allUserComments: "All user comments",
        pending: "Pending",
        needReview: "Need review",
        reviewed: "Reviewed",
        alreadyReviewed: "Already reviewed",
        resolved: "Resolved",
        issueResolved: "Issue resolved",
        search: "Search...",
        commentType: "Comment Type",
        allTypes: "All Types",
        status: "Status",
        allStatus: "All Status",
        no: "No",
        user: "User",
        commentMessage: "Comment Message",
        createdDate: "Created Date",
        actions: "Actions",
        previous: "Previous",
        next: "Next",
        noData: "No data",
        noMatchingData: "No matching data",
        noDataMessage: "There are no comments to show.",
        noMatchingMessage: "Try clearing the search or filter options.",
        clearFilters: "Clear filters",
        editComment: "Edit Comment",
        viewHistory: "View History",
        toggleStatus: "Toggle Status",
        deleteComment: "Delete Comment",
        commentDetail: "Comment Detail",
        userName: "User Name",
        email: "Email",
        message: "Message",
        close: "Close",
        markResolved: "Mark as Resolved",
        deleteTitle: "Delete Comment?",
        deleteBefore: "Are you sure you want to delete comment from",
        cancel: "Cancel",
        delete: "Delete",
        createCommentType: "Create Comment Type",
        createCommentTypeSubtitle: "Add a new type for classifying user comments.",
        name: "Name",
        description: "Description",
        requiredField: "This field is required",
        create: "Create",
        viewCommentTypes: "View Comment Types",
        commentTypeList: "Comment Type List",
        noCommentTypes: "No comment types found.",
        selectCommentType: "Select a comment type to edit",
        editCommentType: "Edit Comment Type",
        edit: "Edit",
        save: "Save",
        deleteCommentTypeTitle: "Delete Comment Type?",
        deleteCommentTypeMessage: "Are you sure you want to delete",
        deleteCommentTypeSuccess: "Comment type deleted successfully.",
        updateCommentTypeSuccess: "Comment type updated successfully.",
        createCommentTypeSuccess: "Comment type created successfully.",
    },
    kh: {
        title: "មតិយោបល់អ្នកប្រើប្រាស់",
        subtitle: "មើលមតិយោបល់ និងគ្រប់គ្រងស្ថានភាពមតិយោបល់",
        totalComments: "មតិយោបល់សរុប",
        allUserComments: "មតិយោបល់អ្នកប្រើប្រាស់ទាំងអស់",
        pending: "កំពុងរង់ចាំ",
        needReview: "ត្រូវការពិនិត្យ",
        reviewed: "បានពិនិត្យ",
        alreadyReviewed: "បានពិនិត្យរួច",
        resolved: "បានដោះស្រាយ",
        issueResolved: "បញ្ហាបានដោះស្រាយ",
        search: "ស្វែងរក...",
        commentType: "ប្រភេទមតិយោបល់",
        allTypes: "ប្រភេទទាំងអស់",
        status: "ស្ថានភាព",
        allStatus: "ស្ថានភាពទាំងអស់",
        no: "ល.រ",
        user: "អ្នកប្រើប្រាស់",
        commentMessage: "សារមតិយោបល់",
        createdDate: "កាលបរិច្ឆេទបង្កើត",
        actions: "សកម្មភាព",
        previous: "មុន",
        next: "បន្ទាប់",
        noData: "មិនមានទិន្នន័យ",
        noMatchingData: "មិនមានទិន្នន័យត្រូវគ្នា",
        noDataMessage: "មិនមានមតិយោបល់សម្រាប់បង្ហាញទេ។",
        noMatchingMessage: "សូមលុបការស្វែងរក ឬ filter ចេញ។",
        clearFilters: "លុប Filter",
        editComment: "កែប្រែមតិយោបល់",
        viewHistory: "មើលប្រវត្តិ",
        toggleStatus: "ប្ដូរស្ថានភាព",
        deleteComment: "លុបមតិយោបល់",
        commentDetail: "ព័ត៌មានលម្អិតមតិយោបល់",
        userName: "ឈ្មោះអ្នកប្រើប្រាស់",
        email: "អ៊ីមែល",
        message: "សារ",
        close: "បិទ",
        markResolved: "កំណត់ថាបានដោះស្រាយ",
        deleteTitle: "លុបមតិយោបល់?",
        deleteBefore: "តើអ្នកពិតជាចង់លុបមតិយោបល់ពី",
        cancel: "បោះបង់",
        delete: "លុប",
        createCommentType: "បង្កើតប្រភេទមតិយោបល់",
        createCommentTypeSubtitle: "បន្ថែមប្រភេទថ្មីសម្រាប់ចាត់ថ្នាក់មតិយោបល់របស់អ្នកប្រើប្រាស់។",
        name: "ឈ្មោះ",
        description: "ការពិពណ៌នា",
        requiredField: "សូមបំពេញព័ត៌មាននេះ",
        create: "បង្កើត",
        viewCommentTypes: "មើលប្រភេទមតិយោបល់",
        commentTypeList: "បញ្ជីប្រភេទមតិយោបល់",
        noCommentTypes: "មិនមានប្រភេទមតិយោបល់ទេ។",
        selectCommentType: "ជ្រើសរើសប្រភេទមតិយោបល់ដើម្បីកែប្រែ",
        editCommentType: "កែប្រែប្រភេទមតិយោបល់",
        edit: "កែប្រែ",
        save: "រក្សាទុក",
        deleteCommentTypeTitle: "លុបប្រភេទមតិយោបល់?",
        deleteCommentTypeMessage: "តើអ្នកពិតជាចង់លុប",
        deleteCommentTypeSuccess: "បានលុបប្រភេទមតិយោបល់ដោយជោគជ័យ។",
        updateCommentTypeSuccess: "បានកែប្រែប្រភេទមតិយោបល់ដោយជោគជ័យ។",
        createCommentTypeSuccess: "បានបង្កើតប្រភេទមតិយោបល់ដោយជោគជ័យ។",
    },
} as const;

export type CommentTypesText = (typeof TEXT)[Lang];

export const COMMENT_TYPE_LABELS: Record<Lang, Record<string, string>> = {
    en: {
        Suggestion: "Suggestion",
        Complaint: "Complaint",
        Question: "Question",
    },
    kh: {
        Suggestion: "សំណើ",
        Complaint: "បណ្ដឹង",
        Question: "សំណួរ",
    },
};

export const STATUS_LABELS: Record<Lang, Record<CommentStatus, string>> = {
    en: {
        Pending: "Pending",
        Reviewed: "Reviewed",
        Resolved: "Resolved",
    },
    kh: {
        Pending: "កំពុងរង់ចាំ",
        Reviewed: "បានពិនិត្យ",
        Resolved: "បានដោះស្រាយ",
    },
};
