import { FC } from 'react';

declare namespace Component {
    export {
        Widget
    }
}
export { Component }

declare const GeoAdministrative: FC<GeoAdministrativeSelectionProps>;

declare type GeoAdministrativeConfig = GeoAdministrativeConfigURL | GeoAdministrativeConfigLocal;

declare interface GeoAdministrativeConfigLocal {
    type: GeoAdministrativeType.LOCAL;
    province: Array<{
        id: string;
        name: string;
    }>;
    regency: Array<{
        id: string;
        province_id: string;
        name: string;
    }>;
    district: Array<{
        id: string;
        regency_id: string;
        name: string;
    }>;
    village: Array<{
        id: string;
        district_id: string;
        name: string;
    }>;
}

declare interface GeoAdministrativeConfigURL {
    type: GeoAdministrativeType.URL;
    province: string;
    regency: string;
    district: string;
    village: string;
}

declare interface GeoAdministrativeModels {
    province?: any;
    regency?: any;
    district?: any;
    village?: any;
}

declare interface GeoAdministrativeSelectionProps {
    defaultValue?: GeoAdministrativeModels;
    config?: GeoAdministrativeConfig;
    onChange?: (data: GeoAdministrativeModels) => void;
}

declare enum GeoAdministrativeType {
    URL = 0,
    LOCAL = 1
}

declare namespace Widget {
    export {
        GeoAdministrative
    }
}

export { }
