/* 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 { DashboardGroup } from '../models/DashboardGroup';
import type { DashboardHome } from '../models/DashboardHome';
import type { DashboardPage_ } from '../models/DashboardPage_';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';
@Injectable({
    providedIn: 'root',
})
export class DashboardService {
    constructor(public readonly http: HttpClient) {}
    /**
     * Get Groups
     * @returns DashboardGroup Successful Response
     * @throws ApiError
     */
    public getGroupsApiDashboardGroupsGet(): Observable<Array<DashboardGroup>> {
        return __request(OpenAPI, this.http, {
            method: 'GET',
            url: '/api/dashboard/groups',
            errors: {
                404: `Not found`,
            },
        });
    }
    /**
     * Get Home
     * @returns DashboardHome Successful Response
     * @throws ApiError
     */
    public getHomeApiDashboardHomeGet(): Observable<DashboardHome> {
        return __request(OpenAPI, this.http, {
            method: 'GET',
            url: '/api/dashboard/home',
            errors: {
                404: `Not found`,
            },
        });
    }
    /**
     * Get Dashboard Page
     * @returns DashboardPage_ Successful Response
     * @throws ApiError
     */
    public getDashboardPageApiDashboardPageGroupNameGet({
        group,
        name,
    }: {
        group: string,
        name: string,
    }): Observable<DashboardPage_> {
        return __request(OpenAPI, this.http, {
            method: 'GET',
            url: '/api/dashboard/page/{group}/{name}',
            path: {
                'group': group,
                'name': name,
            },
            errors: {
                404: `Not found`,
                422: `Validation Error`,
            },
        });
    }
}
