<div class="col-sm-9 col-md-10 col-sm-push-3 col-md-push-2">

    <ol class="breadcrumb">
        <li><a href="#/realms/{{realm.realm}}/clients">Clients</a></li>
        <li>{{client.clientId}}</li>
    </ol>

    <h1>{{client.clientId|capitalize}}</h1>

    <kc-tabs-client></kc-tabs-client>

    <form class="form-horizontal" name="keyForm" novalidate kc-read-only="!access.manageRealm">
        <fieldset class="form-group col-sm-10" data-ng-show="client.attributes['saml.client.signature'] == 'true'">
            <legend uncollapsed><span class="text">Signing Key</span>  <kc-tooltip>SAML Signing Key.</kc-tooltip></legend>
            <div class="form-group" data-ng-hide="!signingKeyInfo.privateKey">
                <label class="col-md-2 control-label" for="signingPrivateKey">Private key</label>

                <div class="col-sm-10">
                    <textarea type="text" id="signingPrivateKey" name="signingPrivateKey" class="form-control" rows="5"
                              kc-select-action="click" readonly>{{signingKeyInfo.privateKey}}</textarea>
                </div>
            </div>
            <div class="form-group" data-ng-hide="!signingKeyInfo.certificate">
                <label class="col-md-2 control-label" for="signingCert">Certificate</label>

                <div class="col-sm-10">
                    <textarea type="text" id="signingCert" name="signingCert" class="form-control" rows="5"
                              kc-select-action="click" readonly>{{signingKeyInfo.certificate}}</textarea>
                </div>
            </div>
            <div class="form-group">
                <div class="col-md-10 col-md-offset-2" data-ng-show="access.manageRealm">
                    <button class="btn btn-default" type="submit" data-ng-click="generateSigningKey()">Generate new keys</button>
                    <button class="btn btn-default" type="submit" data-ng-click="importSigningKey()">Import</button>
                    <button class="btn btn-default" type="submit" data-ng-hide="!signingKeyInfo.certificate" data-ng-click="exportSigningKey()">Export</button>
                </div>
            </div>
        </fieldset>
        <fieldset class="form-group col-sm-10" data-ng-show="client.attributes['saml.encrypt'] == 'true'">
            <legend uncollapsed><span class="text">Encryption Key</span>  <kc-tooltip>SAML Encryption Key.</kc-tooltip></legend>
            <div class="form-group" data-ng-hide="!encryptionKeyInfo.privateKey">
                <label class="col-md-2 control-label" for="encryptionPrivateKey">Private key</label>

                <div class="col-sm-10">
                    <textarea type="text" id="encryptionPrivateKey" name="encryptionPrivateKey" class="form-control" rows="5"
                              kc-select-action="click" readonly>{{encryptionKeyInfo.privateKey}}</textarea>
                </div>
            </div>
            <div class="form-group" data-ng-hide="!encryptionKeyInfo.certificate">
                <label class="col-md-2 control-label" for="encryptionCert">Certificate</label>

                <div class="col-sm-10">
                    <textarea type="text" id="encryptionCert" name="encryptionCert" class="form-control" rows="5"
                              kc-select-action="click" readonly>{{encryptionKeyInfo.certificate}}</textarea>
                </div>
            </div>
            <div class="form-group">
                <div class="col-md-10 col-md-offset-2" data-ng-show="access.manageRealm">
                    <button class="btn btn-default" type="submit" data-ng-click="generateEncryptionKey()">Generate new keys</button>
                    <button class="btn btn-default" type="submit" data-ng-click="importEncryptionKey()">Import</button>
                    <button class="btn btn-default" type="submit" data-ng-hide="!encryptionKeyInfo.certificate" data-ng-click="exportEncryptionKey()">Export</button>
                </div>
            </div>
        </fieldset>
    </form>
</div>

<kc-menu></kc-menu>