Files
threshold-ui/ui/admin/app/components/form/credential-store/index.js
T
Lisbet Alvarez 3ba93927fe Update copyright headers (#3146)
* empty commit

* Add missing copyright headers

* chore: 🤖 update copywrite config file with correct year

* Add missing copyright headers

* empty commit (gh action merge checks are stuck)
2026-01-28 17:09:06 -08:00

30 lines
870 B
JavaScript

/**
* Copyright IBM Corp. 2021, 2026
* SPDX-License-Identifier: BUSL-1.1
*/
import Component from '@glimmer/component';
import { assert } from '@ember/debug';
import {
TYPE_CREDENTIAL_STORE_STATIC,
TYPE_CREDENTIAL_STORE_VAULT,
} from 'api/models/credential-store';
import staticCredentialStoreComponent from './static';
import vaultCredentialStoreComponent from './vault';
const modelTypeToComponent = {
[TYPE_CREDENTIAL_STORE_STATIC]: staticCredentialStoreComponent,
[TYPE_CREDENTIAL_STORE_VAULT]: vaultCredentialStoreComponent,
};
export default class FormCredentialStoreIndex extends Component {
get credentialStoreFormComponent() {
const component = modelTypeToComponent[this.args.model.type];
assert(
`Mapped component must exist for credential store type: ${this.args.model.type}`,
component,
);
return component;
}
}