"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getAddress = void 0;
const axios_1 = __importDefault(require("axios"));
const axiosInstance = axios_1.default.create();
const getAddress = async (search, options) => {
    const token = '64573947b8b0dd50db4cc860d0b02b8baf3c7a40';
    const response = await axiosInstance.post('https://suggestions.dadata.ru/suggestions/api/4_1/rs/suggest/address', { query: search }, {
        headers: {
            'Content-Type': 'application/json',
            Accept: 'application/json',
            Authorization: `Token ${token}`,
            'X-Secret': 'bb22fe88cd5be097f4eba43b253e160590b4ea1f',
        },
        ...options,
    });
    return response.data.suggestions;
};
exports.getAddress = getAddress;
