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