/* tslint:disable */
import { Injectable } from '@angular/core';
import { HttpClient, HttpRequest, HttpResponse, HttpHeaders } from '@angular/common/http';
import { BaseService as __BaseService } from '../base-service';
import { PrintConfiguration as __Configuration } from '../print-configuration';
import { StrictHttpResponse as __StrictHttpResponse } from '../strict-http-response';
import { Observable as __Observable } from 'rxjs';
import { map as __map, filter as __filter } from 'rxjs/operators';

import { ResponseArgs } from '../models/response-args';
import { PrintRequestOfString } from '../models/print-request-of-string';
@Injectable({
  providedIn: 'root',
})
class LoyaltyCardPrintService extends __BaseService {
  static readonly LoyaltyCardPrintPrintLoyaltyCardAGBPath = '/print/loyaltycard/agb';

  constructor(
    config: __Configuration,
    http: HttpClient
  ) {
    super(config, http);
  }

  /**
   * AGB auf Label
   * @param data Artikel
   */
  LoyaltyCardPrintPrintLoyaltyCardAGBResponse(data: PrintRequestOfString): __Observable<__StrictHttpResponse<ResponseArgs>> {
    let __params = this.newParams();
    let __headers = new HttpHeaders();
    let __body: any = null;
    __body = data;
    let req = new HttpRequest<any>(
      'POST',
      this.rootUrl + `/print/loyaltycard/agb`,
      __body,
      {
        headers: __headers,
        params: __params,
        responseType: 'json'
      });

    return this.http.request<any>(req).pipe(
      __filter(_r => _r instanceof HttpResponse),
      __map((_r) => {
        return _r as __StrictHttpResponse<ResponseArgs>;
      })
    );
  }
  /**
   * AGB auf Label
   * @param data Artikel
   */
  LoyaltyCardPrintPrintLoyaltyCardAGB(data: PrintRequestOfString): __Observable<ResponseArgs> {
    return this.LoyaltyCardPrintPrintLoyaltyCardAGBResponse(data).pipe(
      __map(_r => _r.body as ResponseArgs)
    );
  }
}

module LoyaltyCardPrintService {
}

export { LoyaltyCardPrintService }
