export const FeedbackTypes = ['kritik', 'saran', 'aduan'] as const;

export type FeedbackTypeValue = (typeof FeedbackTypes)[number];

export const FeedbackTypeLabels: Record<FeedbackTypeValue, string> = {
    kritik: 'Kritik',
    saran: 'Saran',
    aduan: 'Aduan',
};

export const FeedbackStatuses = ['submitted', 'in_review', 'resolved'] as const;

export type FeedbackStatusValue = (typeof FeedbackStatuses)[number];

export const FeedbackStatusLabels: Record<FeedbackStatusValue, string> = {
    submitted: 'Terkirim',
    in_review: 'Ditinjau',
    resolved: 'Selesai',
};

export type FeedbackHandler = {
    id: number;
    profile: { full_name: string } | null;
};

export type FeedbackUser = {
    id: number;
    profile: { full_name: string } | null;
};

export type Feedback = {
    id: number;
    user_id: number;
    user: FeedbackUser | null;
    type: FeedbackTypeValue;
    subject: string;
    message: string;
    status: FeedbackStatusValue;
    admin_notes: string | null;
    handled_by: number | null;
    handler: FeedbackHandler | null;
    created_at: string;
    updated_at: string;
};
