import { Component } from '@angular/core';
import { GeneralDeviceRegistrationService } from './general-device-registration.service';
import * as i0 from "@angular/core";
import * as i1 from "./general-device-registration.service";
import * as i2 from "@c8y/ngx-components";
export class GeneralDeviceRegistrationButtonComponent {
    constructor(registrationService) {
        this.registrationService = registrationService;
    }
    async open() {
        try {
            await this.registrationService.open();
        }
        catch {
            // modal was closed
        }
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GeneralDeviceRegistrationButtonComponent, deps: [{ token: i1.GeneralDeviceRegistrationService }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: GeneralDeviceRegistrationButtonComponent, selector: "c8y-general-device-registration-button", ngImport: i0, template: "<button title=\"{{ 'General' | translate }}\" type=\"button\" (click)=\"open()\">\n  <i c8yIcon=\"c8y-device-connect\"></i>\n  {{ 'General' | translate }}\n</button>\n", dependencies: [{ kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GeneralDeviceRegistrationButtonComponent, decorators: [{
            type: Component,
            args: [{ selector: 'c8y-general-device-registration-button', template: "<button title=\"{{ 'General' | translate }}\" type=\"button\" (click)=\"open()\">\n  <i c8yIcon=\"c8y-device-connect\"></i>\n  {{ 'General' | translate }}\n</button>\n" }]
        }], ctorParameters: () => [{ type: i1.GeneralDeviceRegistrationService }] });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2VuZXJhbC1kZXZpY2UtcmVnaXN0cmF0aW9uLWJ1dHRvbi5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9yZWdpc3Rlci1kZX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