import type {DashboardWidget} from '@sanity/dashboard'
import type {LayoutConfig} from '@sanity/dashboard'

declare interface DocumentListConfig {
  title?: string
  types?: string[]
  query?: string
  queryParams?: Record<string, any>
  order?: string
  limit?: number
  showCreateButton?: boolean
  createButtonText?: string
  apiVersion?: string
}

export declare function documentListWidget(config: DocumentListWidgetConfig): DashboardWidget

export declare interface DocumentListWidgetConfig extends DocumentListConfig {
  layout?: LayoutConfig
}

export {}
