import { module } from 'angular'; import React from 'react'; import { react2angular } from 'react2angular'; import { ArtifactIcon } from './ArtifactIcon'; import type { IArtifactAccount } from '../../account'; import { TetheredSelect } from '../../presentation'; import { withErrorBoundary } from '../../presentation/SpinErrorBoundary'; export interface IArtifactAccountSelectorProps { accounts: IArtifactAccount[]; selected: IArtifactAccount; onChange: (account: IArtifactAccount) => void; className?: string; } export class ArtifactAccountSelector extends React.Component { constructor(props: IArtifactAccountSelectorProps) { super(props); } private renderOption = (account: IArtifactAccount) => { return ( {account.name} ); }; public render() { return ( ); } } export const ARTIFACT_ACCOUNT_SELECTOR_COMPONENT_REACT = 'spinnaker.core.artifacts.account.selector.react'; module(ARTIFACT_ACCOUNT_SELECTOR_COMPONENT_REACT, []).component( 'artifactAccountSelectorReact', react2angular(withErrorBoundary(ArtifactAccountSelector, 'artifactAccountSelectorReact'), [ 'accounts', 'className', 'onChange', 'selected', ]), );