import {CrownDiamond, Pencil} from '@gravity-ui/icons'; import {ActionTooltip, Button, Card, Divider, Flex, Icon, Text} from '@gravity-ui/uikit'; import {SubjectWithAvatar} from '../../../../../components/SubjectWithAvatar/SubjectWithAvatar'; import {useEditAccessAvailable} from '../../../../../store/reducers/capabilities/hooks'; import {useClusterWithProxy} from '../../../../../store/reducers/cluster/cluster'; import {selectSchemaOwner} from '../../../../../store/reducers/schemaAcl/schemaAcl'; import {useAclSyntax, useTypedSelector} from '../../../../../utils/hooks'; import {useCurrentSchema} from '../../../TenantContext'; import i18n from '../i18n'; import {block} from '../shared'; import {getChangeOwnerDialog} from './ChangeOwnerDialog'; export function Owner() { const editable = useEditAccessAvailable(); const {path, database, databaseFullPath} = useCurrentSchema(); const useMetaProxy = useClusterWithProxy(); const dialect = useAclSyntax(); const owner = useTypedSelector((state) => selectSchemaOwner(state, path, database, databaseFullPath, dialect, useMetaProxy), ); if (!owner) { return null; } const renderIcon = () => { return ( ); }; return ( {editable && ( )} {i18n('description_owner')} ); }