import { ComponentClass } from 'react'
import { CommonEventFunction } from '@tarojs/components/types/common'
import CtsComponent from './base'

export interface CtsAddressProps extends CtsComponent {
	/**
	 * 省市区选中项id数组[province,city,district]
	 */
	value: any[]
	/**
	 * 省市区名称
	 */
	region: string
	/**
	 * 是否禁用
	 * @default false
	 */
	disabled?: boolean
	/**
	 * 选择省市区事件
	 */
	onChange: CommonEventFunction
}

export interface CtsAddressState {
	/**
	 * 省市区三维数组
	 */
	range: any[]
	/**
	 * 省市区三维数组索引
	 */
	multiIndex: any[]
	/**
	 * 省市区名称
	 */
	addressName: string
}

declare const CtsAddress: ComponentClass<CtsAddressProps>

export default CtsAddress