declare namespace AMap {
  namespace DistrictLayer {
    namespace Province {
      export interface ProvinceStrokeProps {
        NAME_CHN: string
        adcode_pro: string
        adcode: string
        x: number
        y: number
      }

      export interface CityStrokeProps {
        NAME_CHN: string
        adcode: string
        adcode_cit: string
        adcode_pro: string
        citycode: string
        level: number
        type: 'City_Border_China'
        x: number
        y: number
      }

      export interface CountyStrokeProps {
        NAME_CHN: string
        adcode: string
        adcode_cit: string
        adcode_pro: string
        citycode: string
        level: number
        type: 'County_Border_China'
        x: number
        y: number
      }

      export interface FillProps {
        NAME_CHN: string
        SOC: string
        adcode: string
        adcode_cit: string
        adcode_pro: string
        citycode: string
        level: number
      }

      export interface Styles {
        'province-stroke'?: string | ((props: ProvinceStrokeProps) => string)
        'city-stroke'?: string | ((props: CityStrokeProps) => string)
        'county-stroke'?: string | ((props: CountyStrokeProps) => string)
        fill?: string | ((props: FillProps) => string)
      }

      export interface Options extends AMap.DistrictLayer.Options {
        styles?: Styles
        depth?: number
        adcode?: string[]
      }
    }

    export interface Province extends DistrictLayer {
      new (options?: Province.Options): Province

      getDistrictByContainerPos(pixel: AMap.Pixel): Province.FillProps
    }
  }
}
