import { CheckIcon, DatabaseIcon, UserCheckIcon, UserXIcon } from 'lucide-react'
import { Separator, ToggleGroup, ToggleGroupItem } from 'ui'
import { UserImpersonationSelector } from './UserImpersonationSelector'
import { useRoleImpersonationSelection } from './useRoleImpersonationSelection'
import {
useRoleImpersonationStateSnapshot,
type RoleImpersonationController,
} from '@/state/role-impersonation-state'
export interface RoleImpersonationSelectorProps {
header?: string
serviceRoleLabel?: string
disallowAuthenticatedOption?: boolean
title?: string
}
/**
* Tightly coupled with the global role impersonation store.
* Use RoleImpersonationSelectorInterface to control the logic externally.
*/
export const RoleImpersonationSelector = (props: RoleImpersonationSelectorProps) => {
const state = useRoleImpersonationStateSnapshot() as unknown as RoleImpersonationController
return