export interface IWindowSize {
	width?: number
	height?: number
}

/////

export interface IColumnItem {
	key: string
	title: string
	sort?: string
}

/////

export type SortType = 'asc' | 'desc' | false

export interface ISortItem {
	column: string
	order: SortType
}

/////

export interface IDataQuery {
	q?: string
	sort?: string
	filter?: string
	page?: string
	limit?: string
}

export interface IGetDataOptions {
	q?: string
	sort?: ISortItem[]
	filter?: Record<string, any>
	page?: number
	limit?: number
}

/////

export interface IPaginationOptions {
	page: number
	limit: number
	pages: number
	total: number
}

export interface IPagination extends IPaginationOptions {
	hasPrevPage: boolean
	hasNextPage: boolean
	pageNumbers: (number | 'ellipsis')[]
}

/////

export interface IFilterQuery {
	querykey: string
	queryFn: (params: any) => any
}

/////

export type TranslateFn = (
	key: string,
	values?: Record<string, string | number | Date>
) => string

/////

export enum AccessType {
	VIEW = 'view',
	EDIT = 'edit',
	ALL = 'all'
}

interface IGuardItem {
	id: number
	type: AccessType
}

export interface IGuard {
	users: IGuardItem[]
	groups: IGuardItem[]
}
