import { useSettingsSelect } from '@greenpay/redux'
import { getBankLoginProvider } from './registry'
import { IBankLoginProvider } from './types'

export function useConfiguredBankLoginProvider(): IBankLoginProvider {
	const settings = useSettingsSelect().getSettings()
	return getBankLoginProvider(settings?.bankLoginProvider)
}
