import { ComponentOptionsMixin, DefineComponent } from 'vue';
import { Picker as CorePicker } from 'zmp-core/components/picker';

interface PickerOptions {
  values?: string[];
  displayValues?: string[];
  cssClass?: string;
  textAlign?: 'left' | 'right' | 'center';
  width?: number;
  divider?: boolean;
  content?: string;
  onChange?: (picker: CorePicker.Picker, value: string, displayValue: string) => void;
}

declare const Picker: DefineComponent<
  {
    placeholder?: string;
    title?: string;
    label?: string;
    info?: string;
    errorMessage?: string;
    errorMessageForce?: boolean;
    required?: boolean;
    data?: PickerOptions[];
    selected?: string[];
    actionText?: string;
    formatValue?: (values: string[], displayValues: string[]) => string;
  },
  () => JSX.Element,
  unknown,
  {},
  {},
  ComponentOptionsMixin,
  ComponentOptionsMixin,
  ('action' | 'change' | 'cancel')[],
  'action' | 'change' | 'cancel'
>;

export default Picker;
