/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import type { Observable } from 'rxjs';
import type { BaseStyle } from '../models/BaseStyle';
import type { MapInitData } from '../models/MapInitData';
import type { MaplibreStyle } from '../models/MaplibreStyle';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';
@Injectable({
    providedIn: 'root',
})
export class MapService {
    constructor(public readonly http: HttpClient) {}
    /**
     * Get Init Data
     * @returns MapInitData Successful Response
     * @throws ApiError
     */
    public getInitDataApiMapInitDataGet(): Observable<MapInitData> {
        return __request(OpenAPI, this.http, {
            method: 'GET',
            url: '/api/map/init-data',
        });
    }
    /**
     * Get Base Style
     * @returns BaseStyle Successful Response
     * @throws ApiError
     */
    public getBaseStyleApiMapBaseStyleNameGet({
        name,
    }: {
        name: string,
    }): Observable<BaseStyle> {
        return __request(OpenAPI, this.http, {
            method: 'GET',
            url: '/api/map/base_style/{name}',
            path: {
                'name': name,
            },
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Get Layer Style
     * @returns any Successful Response
     * @throws ApiError
     */
    public getLayerStyleApiMapLayerStyleStoreGet({
        store,
    }: {
        store: string,
    }): Observable<(MaplibreStyle | null)> {
        return __request(OpenAPI, this.http, {
            method: 'GET',
            url: '/api/map/layer_style/{store}',
            path: {
                'store': store,
            },
            errors: {
                422: `Validation Error`,
            },
        });
    }
}
