import { __decorate, __metadata } from "tslib";
import { Component, Input } from '@angular/core';
import { FormGroup } from '@angular/forms';
let IdentityClientsUpdateSettingComponent = class IdentityClientsUpdateSettingComponent {
    constructor() {
        this.identityClientsUpdatePropertyComponentProp = {
            visible: false,
        };
        this.identityClientsUpdateSecretComponentProp = {
            visible: false,
        };
    }
    get allowedScopesControl() {
        return this.formGroup.get('allowedScopes');
    }
    get clientIdControl() {
        return this.formGroup.get('clientId');
    }
    get protocolTypeControl() {
        return this.formGroup.get('protocolType');
    }
    get redirectUrisControl() {
        return this.formGroup.get('redirectUris');
    }
    handleSubmit() { }
    openIdentityClientsUpdatePropertyComponent(event) {
        event.preventDefault();
        this.identityClientsUpdatePropertyComponentProp.visible = true;
    }
    openIdentityClientsUpdateSecretComponent(event) {
        event.preventDefault();
        this.identityClientsUpdateSecretComponentProp.visible = true;
    }
};
__decorate([
    Input(),
    __metadata("design:type", FormGroup)
], IdentityClientsUpdateSettingComponent.prototype, "formGroup", void 0);
IdentityClientsUpdateSettingComponent = __decorate([
    Component({
        selector: 'kg---identity--clients--update--setting',
        template: "<form (ngSubmit)=\"handleSubmit()\" [formGroup]=\"formGroup\" nz-form nzLayout=\"vertical\">\n  <div [nzGutter]=\"32\" nz-row>\n    <div [nzSpan]=\"6\" nz-col>\n      <nz-form-item>\n        <nz-form-label [nzFor]=\"'enabled'\">\n          {{ 'projects/fe-ng/src/lib/page/identity/clients/update/setting/identity--clients--update--setting.enabled' | i18n }}:\n        </nz-form-label>\n        <nz-form-control>\n          <nz-switch [attr.id]=\"'enabled'\" [formControlName]=\"'enabled'\"></nz-switch>\n        </nz-form-control>\n      </nz-form-item>\n    </div>\n\n    <div [nzSpan]=\"6\" nz-col>\n      <nz-form-item>\n        <nz-form-label [nzFor]=\"'requireConsent'\">\n          {{ 'projects/fe-ng/src/lib/page/identity/clients/update/setting/identity--clients--update--setting.require_consent' | i18n }}:\n        </nz-form-label>\n        <nz-form-control>\n          <nz-switch [attr.id]=\"'requireConsent'\" [formControlName]=\"'requireConsent'\"></nz-switch>\n        </nz-form-control>\n      </nz-form-item>\n    </div>\n\n    <div [nzSpan]=\"6\" nz-col>\n      <nz-form-item>\n        <nz-form-label [nzFor]=\"'allowRememberConsent'\">\n          {{ 'projects/fe-ng/src/lib/page/identity/clients/update/setting/identity--clients--update--setting.allow_remember_consent' | i18n }}:\n        </nz-form-label>\n        <nz-form-control>\n          <nz-switch [attr.id]=\"'allowRememberConsent'\" [formControlName]=\"'allowRememberConsent'\"></nz-switch>\n        </nz-form-control>\n      </nz-form-item>\n    </div>\n\n    <div [nzSpan]=\"6\" nz-col>\n      <nz-form-item>\n        <nz-form-label [nzFor]=\"'allowOfflineAccess'\">\n          {{ 'projects/fe-ng/src/lib/page/identity/clients/update/setting/identity--clients--update--setting.allow_offline_access' | i18n }}:\n        </nz-form-label>\n        <nz-form-control>\n          <nz-switch [attr.id]=\"'allowOfflineAccess'\" [formControlName]=\"'allowOfflineAccess'\"></nz-switch>\n        </nz-form-control>\n      </nz-form-item>\n    </div>\n  </div>\n\n  <nz-form-item>\n    <nz-form-label [nzFor]=\"'allowedScopes'\">\n      {{ 'projects/fe-ng/src/lib/page/identity/clients/update/setting/identity--clients--update--setting.allowed_scopes' | i18n }}:\n    </nz-form-label>\n    <nz-form-control>\n      <nz-select [attr.id]=\"'allowedScopes'\" [formControlName]=\"'allowedScopes'\" nzMode=\"tags\">\n        <nz-option *ngFor=\"let item of allowedScopesControl.value\" [nzLabel]=\"item\" [nzValue]=\"item\"></nz-option>\n      </nz-select>\n    </nz-form-control>\n  </nz-form-item>\n\n  <nz-form-item>\n    <nz-form-label [nzFor]=\"'redirectUris'\">\n      {{ 'projects/fe-ng/src/lib/page/identity/clients/update/setting/identity--clients--update--setting.redirect_uris' | i18n }}:\n    </nz-form-label>\n    <nz-form-control>\n      <nz-select [attr.id]=\"'redirectUris'\" [formControlName]=\"'redirectUris'\" nzMode=\"tags\">\n        <nz-option *ngFor=\"let item of redirectUrisControl.value\" [nzLabel]=\"item\" [nzValue]=\"item\"></nz-option>\n      </nz-select>\n    </nz-form-control>\n  </nz-form-item>\n\n  <nz-form-item>\n    <nz-form-label [nzFor]=\"'allowedGrantTypes'\">\n      {{ 'projects/fe-ng/src/lib/page/identity/clients/update/setting/identity--clients--update--setting.allowed_grant_types' | i18n }}:\n    </nz-form-label>\n    <nz-form-control>\n      <nz-select [attr.id]=\"'allowedGrantTypes'\" [formControlName]=\"'allowedGrantTypes'\" nzMode=\"multiple\">\n        <nz-option\n          *ngFor=\"let item of ['implicit', 'client_credentials', 'authorization_code', 'hybrid', 'password']\"\n          [nzLabel]=\"item\"\n          [nzValue]=\"item\"\n        ></nz-option>\n      </nz-select>\n    </nz-form-control>\n  </nz-form-item>\n\n  <div [nzGutter]=\"32\" nz-row>\n    <div [nzSpan]=\"6\" nz-col>\n      <nz-form-item>\n        <nz-form-label [nzFor]=\"'requireClientSecret'\">\n          {{ 'projects/fe-ng/src/lib/page/identity/clients/update/setting/identity--clients--update--setting.require_client_secret' | i18n }}:\n        </nz-form-label>\n        <nz-form-control>\n          <nz-switch [attr.id]=\"'requireClientSecret'\" [formControlName]=\"'requireClientSecret'\"></nz-switch>\n        </nz-form-control>\n      </nz-form-item>\n    </div>\n\n    <div [nzSpan]=\"6\" nz-col>\n      <nz-form-item>\n        <nz-form-label [nzFor]=\"'requirePkce'\">\n          {{ 'projects/fe-ng/src/lib/page/identity/clients/update/setting/identity--clients--update--setting.require_pkce' | i18n }}:\n        </nz-form-label>\n        <nz-form-control>\n          <nz-switch [attr.id]=\"'requirePkce'\" [formControlName]=\"'requirePkce'\"></nz-switch>\n        </nz-form-control>\n      </nz-form-item>\n    </div>\n\n    <div [nzSpan]=\"6\" nz-col>\n      <nz-form-item>\n        <nz-form-label [nzFor]=\"'allowPlainTextPkce'\">\n          {{ 'projects/fe-ng/src/lib/page/identity/clients/update/setting/identity--clients--update--setting.allow_plain_text_pkce' | i18n }}:\n        </nz-form-label>\n        <nz-form-control>\n          <nz-switch [attr.id]=\"'allowPlainTextPkce'\" [formControlName]=\"'allowPlainTextPkce'\"></nz-switch>\n        </nz-form-control>\n      </nz-form-item>\n    </div>\n\n    <div [nzSpan]=\"6\" nz-col>\n      <nz-form-item>\n        <nz-form-label [nzFor]=\"'allowAccessTokensViaBrowser'\">\n          {{ 'projects/fe-ng/src/lib/page/identity/clients/update/setting/identity--clients--update--setting.allow_access_tokens_via_browser' | i18n }}:\n        </nz-form-label>\n        <nz-form-control>\n          <nz-switch [attr.id]=\"'allowAccessTokensViaBrowser'\" [formControlName]=\"'allowAccessTokensViaBrowser'\"></nz-switch>\n        </nz-form-control>\n      </nz-form-item>\n    </div>\n  </div>\n\n  <nz-form-item>\n    <nz-form-label [nzFor]=\"'protocolType'\">\n      {{ 'projects/fe-ng/src/lib/page/identity/clients/update/setting/identity--clients--update--setting.protocol_type' | i18n }}:\n    </nz-form-label>\n    <nz-form-control>\n      <nz-select [attr.id]=\"'protocolType'\" [formControlName]=\"'protocolType'\">\n        <nz-option *ngFor=\"let item of [protocolTypeControl.value]\" [nzLabel]=\"item\" [nzValue]=\"item\"></nz-option>\n      </nz-select>\n    </nz-form-control>\n  </nz-form-item>\n\n  <div [nzGutter]=\"32\" nz-row>\n    <div [nzSpan]=\"8\" nz-col>\n      <nz-form-item>\n        <nz-form-label>\n          {{ 'projects/fe-ng/src/lib/page/identity/clients/update/setting/identity--clients--update--setting.client_secrets' | i18n }}:\n        </nz-form-label>\n        <nz-form-control>\n          <button (click)=\"openIdentityClientsUpdateSecretComponent($event)\" nz-button nzType=\"primary\" type=\"button\">\n            {{ 'projects/fe-ng/src/lib/page/identity/clients/update/setting/identity--clients--update--setting.client_secrets' | i18n }}\n          </button>\n        </nz-form-control>\n      </nz-form-item>\n    </div>\n\n    <div [nzSpan]=\"8\" nz-col>\n      <nz-form-item>\n        <nz-form-label>\n          {{ 'projects/fe-ng/src/lib/page/identity/clients/update/setting/identity--clients--update--setting.properties' | i18n }}:\n        </nz-form-label>\n        <nz-form-control>\n          <button (click)=\"openIdentityClientsUpdatePropertyComponent($event)\" nz-button nzType=\"primary\" type=\"button\">\n            {{ 'projects/fe-ng/src/lib/page/identity/clients/update/setting/identity--clients--update--setting.properties' | i18n }}\n          </button>\n        </nz-form-control>\n      </nz-form-item>\n    </div>\n  </div>\n</form>\n\n<kg---identity--clients--update--secret\n  [(visible)]=\"identityClientsUpdateSecretComponentProp.visible\"\n  [clientId]=\"clientIdControl.value\"\n></kg---identity--clients--update--secret>\n\n<kg---identity--clients--update--property\n  [(visible)]=\"identityClientsUpdatePropertyComponentProp.visible\"\n  [clientId]=\"clientIdControl.value\"\n></kg---identity--clients--update--property>\n"
    })
], IdentityClientsUpdateSettingComponent);
export { IdentityClientsUpdateSettingComponent };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWRlbnRpdHktLWNsaWVudHMtLXVwZGF0ZS0tc2V0dGluZy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9Aa2VuZ2ljL2ZlLW5nLyIsInNvdXJjZXMiOlsibGliL3BhZ2UvaWRlbnRpdHkvY2xpZW50cy91cGRhdGUvc2V0dGluZy9pZGVudGl0eS0tY2xpZW50cy0tdXBkYXRlLS1zZXR0aW5nLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxLQUFLLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDakQsT0FBTyxFQUFlLFNBQVMsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBTXhELElBQWEscUNBQXFDLEdBQWxELE1BQWEscUNBQXFDO0lBQWxEO1FBR1MsK0NBQTBDLEdBQXlCO1lBQ3hFLE9BQU8sRUFBRSxLQUFLO1NBQ2YsQ0FBQztRQUNLLDZDQUF3QyxHQUF5QjtZQUN0RSxPQUFPLEVBQUUsS0FBSztTQUNmLENBQUM7SUErQkosQ0FBQztJQT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