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

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

      export interface FillProps {
        SOC: string
        NAME_CHN: string
        NAME_ENG: string
      }

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

      export interface Options extends AMap.DistrictLayer.Options {
        styles?: Styles
      }
    }

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

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