declare namespace AMap {
  namespace DistrictLayer {
    namespace Country {
      export interface NationStrokeProps {
        type: 'Nation_Border_China' | 'Nation_Border_Foreign'
      }

      export interface CoastlineStrokeProps {
        // type: 'Coastline_China' | 'Coastline_Foreign'
      }

      export interface ProvinceStrokeProps {
        type: 'Province_Border_China' | 'Province_Border_Foreign'
      }

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

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

      export interface Styles {
        'nation-stroke'?: string | ((props: NationStrokeProps) => string)
        'coastline-stroke'?: string | ((props: CoastlineStrokeProps) => string)
        'province-stroke'?: string | ((props: ProvinceStrokeProps) => string)
        'city-stroke'?: string | ((props: CityStrokeProps) => string)
        fill?: string | ((props: FillProps) => string)
      }

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

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

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