{{#if updating}} {{loading-spinner size="small"}} {{else}} {{#if responseIcon}} {{d-icon responseIcon}} {{/if}} {{/if}} {{d-button label="admin.wizard.api.save" action="save" class="btn-primary" disabled=saveDisabled}} {{#if showRemove}} {{d-button action="remove" label="admin.wizard.api.remove"}} {{/if}} {{#if error}}
{{error}}
{{/if}}
{{#if api.isNew}} {{i18n 'admin.wizard.api.new'}} {{else}} {{api.title}} {{/if}}
{{input value=api.title placeholder=(i18n 'admin.wizard.api.title_placeholder')}}
{{#if api.isNew}} {{input value=api.name placeholder=(i18n 'admin.wizard.api.name_placeholder')}} {{else}} {{api.name}} {{/if}}
{{#if isOauth}} {{d-button label="admin.wizard.api.auth.btn" action="authorize" disabled=authDisabled class="btn-primary"}} {{/if}}
{{i18n 'admin.wizard.api.auth.label'}}
{{i18n 'admin.wizard.api.auth.settings'}}
{{#if isOauth}} {{#if api.name}}
{{api.redirectUri}}
{{/if}} {{/if}}
{{combo-box value=api.authType content=authorizationTypes none='admin.wizard.api.auth.type_none'}}
{{#if isOauth}}
{{input value=api.authUrl}}
{{input value=api.tokenUrl}}
{{input value=api.clientId}}
{{input value=api.clientSecret}}
{{#each api.authParams as |param|}}
{{input value=param.key placeholder=(i18n 'admin.wizard.api.auth.params.key')}} {{input value=param.value placeholder=(i18n 'admin.wizard.api.auth.params.value')}} {{d-button action='removeParam' actionParam=param icon='times'}}
{{/each}} {{d-button label='admin.wizard.api.auth.params.new' icon='plus' action='addParam'}}
{{/if}} {{#if isBasicAuth}}
{{input value=api.username}}
{{input value=api.password}}
{{/if}}
{{#if isOauth}}
{{#if api.authorized}} {{i18n "admin.wizard.api.status.authorized"}} {{else}} {{i18n "admin.wizard.api.status.not_authorized"}} {{/if}}
{{i18n 'admin.wizard.api.status.label'}}
{{api.code}}
{{api.accessToken}}
{{api.refreshToken}}
{{api.tokenExpiresAt}}
{{api.tokenRefreshAt}}
{{/if}}
{{i18n 'admin.wizard.api.endpoint.label'}}
{{d-button action='addEndpoint' label='admin.wizard.api.endpoint.add' icon='plus'}} {{#if api.endpoints}}
{{/if}}