export type ComponentWithProps = { component: Component, props: Record<string, any> }

export interface ButtonNav {
  variant?: 'default' | 'destructive' | 'outline' | 'secondary' | 'ghost' | 'link'
  classVal?: string
  classValExt?: string
  icon?: string
  label: string
  onClick?: () => void
}

// can type directly
export interface QuickSearchNav {
  modelValue?: string
  placeholder?: string
  inputClass?: string
  inputPlaceHolder?: string
  minLength?: number
  btnClass?: string
  btnIcon?: string
  btnLabel?: string
  showValidationFeedback?: boolean
  debounceDuration?: number
  searchParams: object
  onSubmit?: (searchParams: object) => void
  onClear: () => void
}

// callback on event
export interface RefSearchNav {
  modelValue?: string
  placeholder?: string
  inputClass?: string
  inputPlaceHolder?: string
  btnClass?: string
  btnIcon?: string
  onInput: (val: string) => void
  onClick: () => void
  onClear: () => void
}

export interface RefExportNav {
  onExportPdf?: () => void
  onExportCsv?: () => void
  onExportExcel?: () => void
}

export interface Config {
  title?: string
  icon?: string
  components?: ComponentWithProps[]
  quickSearchNav?: QuickSearchNav
  refSearchNav?: RefSearchNav // either ref or quick
  filterNav?: ButtonNav
  addNav?: ButtonNav
  printNav?: ButtonNav
}

export { default as ContentHeader } from './content-header.vue'
