import {AlertComponentType} from "@/types/admin/component/props/admin-alert";
import {PaginationListAdminComponentProps} from "@/types/admin/component/props/list-table";
import {BaseMessage} from "@/types/system";

export interface Form {
    id: string;
    messages: Array<Message>;
    renderedForm: string;
}

export interface WebauthnForm {
    optionsUrl: string;
    resultUrl: string;
    onSuccessRedirectUrl: string;
}

export interface Message extends BaseMessage {
    type: AlertComponentType;
}

export interface List<T> {
    items: Array<T>;
    pageSize: number;
    totalRecords: number;
    pagination?: PaginationListAdminComponentProps;
}

export interface Edit<T> {
    record: T;
}

export interface ParentEntity<T> {
    parentEntity: T;
}

export interface SettingsSection {
    group: string;
    priority: number;
    title: string;
    form: string;
}

export interface SettingsGroup {
    name: string;
    key: string;
    isActive: boolean;
}
