import { DefineComponent } from 'vue';
import { Nullable } from '../ts-helpers';
import { CoordinateValue } from '../DialogCoordinate/DialogCoordinate.vue.d';

/**
 * InputCoordinate component props
 */
export interface InputCoordinateProps {
  modelValue?: Nullable<CoordinateValue>;
  /**
   * Disabled state for both input fields.
   */
  disabled?: boolean;
  /**
   * Wether the input should be validated with vee-validator or not.
   * If you use this component within form input, you need to set this props as true.
   */
  useValidator?: boolean;
  /**
   * This prop is required if you use this component in a form input.
   * Specify the unique field name, match with your needs for API request.
   *
   * @default 'coordinate'
   */
  fieldName?: string;
  label?: string;
  /**
   * Wether this input field is required or not.
   */
  mandatory?: boolean;
  /**
   * Invalid input state.
   */
  invalid?: boolean;
  /**
   * Set custom validator message.
   * It is rarely use, this component has handled the validator message.
   */
  validatorMessage?: string;
  /**
   * Wether to show the input or not.
   *
   * @default true
   */
  showInput?: boolean;
}

/**
 * InputCoordinate component emits
 */
export type InputCoordinateEmits = {
  'update:modelValue': [payload?: Nullable<CoordinateValue>];
};

/**
 * **TSVue - InputCoordinate**
 *
 * _Handle coordinate input with latitude and longitude fields._
 *
 * --- ---
 * ![TSVue](https://ik.imagekit.io/kurniadev/TS-HEAD-BLACK.png)
 *
 * @group form
 */
declare const InputCoordinate: DefineComponent<
  InputCoordinateProps,
  InputCoordinateEmits
>;

export default InputCoordinate;
