import type { Paginated, SelectOption } from '@/types/common';

export type { SelectOption } from '@/types/common';

export type ActivityLogChange = {
    field: string;
    old: unknown;
    new: unknown;
};

export type ActivityLogListItem = {
    id: number;
    description: string;
    event: string | null;
    event_label: string;
    subject_type: string | null;
    subject_label: string;
    subject_id: number | null;
    causer_name: string;
    created_at: string | null;
    created_at_formatted: string | null;
    changes: ActivityLogChange[];
};

export type ActivityLogFilters = {
    search: string;
    sort?: string;
    direction?: 'asc' | 'desc' | null;
    event?: string;
    subject_type?: string;
};

export type PaginatedActivityLogs = Paginated<ActivityLogListItem>;
