import { __decorate, __metadata } from "tslib";
import { Component, Input } from '@angular/core';
import { FormGroup } from '@angular/forms';
var IdentityClientsUpdateSettingComponent = /** @class */ (function () {
    function IdentityClientsUpdateSettingComponent() {
        this.identityClientsUpdatePropertyComponentProp = {
            visible: false,
        };
        this.identityClientsUpdateSecretComponentProp = {
            visible: false,
        };
    }
    Object.defineProperty(IdentityClientsUpdateSettingComponent.prototype, "allowedScopesControl", {
        get: function () {
            return this.formGroup.get('allowedScopes');
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IdentityClientsUpdateSettingComponent.prototype, "clientIdControl", {
        get: function () {
            return this.formGroup.get('clientId');
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IdentityClientsUpdateSettingComponent.prototype, "protocolTypeControl", {
        get: function () {
            return this.formGroup.get('protocolType');
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IdentityClientsUpdateSettingComponent.prototype, "redirectUrisControl", {
        get: function () {
            return this.formGroup.get('redirectUris');
        },
        enumerable: true,
        configurable: true
    });
    IdentityClientsUpdateSettingComponent.prototype.handleSubmit = function () { };
    IdentityClientsUpdateSettingComponent.prototype.openIdentityClientsUpdatePropertyComponent = function (event) {
        event.preventDefault();
        this.identityClientsUpdatePropertyComponentProp.visible = true;
    };
    IdentityClientsUpdateSettingComponent.prototype.openIdentityClientsUpdateSecretComponent = function (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);
    return IdentityClientsUpdateSettingComponent;
}());
export { IdentityClientsUpdateSettingComponent };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWRlbnRpdHktLWNsaWVudHMtLXVwZGF0ZS0tc2V0dGluZy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9Aa2VuZ2ljL2ZlLW5nLyIsInNvdXJjZXMiOlsibGliL3BhZ2UvaWRlbnRpdHkvY2xpZW50cy91cGRhdGUvc2V0dGluZy9pZGVudGl0eS0tY2xpZW50cy0tdXBkYXRlLS1zZXR0aW5nLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm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