import styled from 'styled-components';
import { useIconToImageURL } from '../../../hooks/useIconToImageURL';
import { QRCodeLogoProps, SessionQRCode } from '../../SessionQRCode';
import { Avatar, AvatarSize } from '../../avatar/Avatar';
import { Flex } from '../../basic/Flex';
import { SpacerSM } from '../../basic/Text';
import { SessionIconButton } from '../../icon';
const qrLogoProps: QRCodeLogoProps = {
iconType: 'brandThin',
iconSize: 42,
};
export const QRView = ({ sessionID }: { sessionID: string }) => {
const { dataURL, iconSize, iconColor, backgroundColor, loading } = useIconToImageURL(qrLogoProps);
return (
);
};
type ProfileAvatarProps = {
avatarPath: string | null;
newAvatarObjectUrl?: string | null;
profileName: string | undefined;
ourId: string;
};
export const ProfileAvatar = (props: ProfileAvatarProps) => {
const { newAvatarObjectUrl, avatarPath, profileName, ourId } = props;
return (
);
};
type ProfileHeaderProps = ProfileAvatarProps & {
onClick: () => void;
onQRClick: () => void;
};
export const ProfileHeader = (props: ProfileHeaderProps) => {
const { avatarPath, profileName, ourId, onClick, onQRClick } = props;
return (
);
};
// We center the name in the modal by offsetting the pencil icon
// we have a transparent border to match the dimensions of the SessionInput
const StyledProfileName = styled(Flex)`
margin-inline-start: calc((25px + var(--margins-sm)) * -1);
padding: 8px;
border: 1px solid var(--transparent-color);
.session-icon-button {
padding: 0px;
}
`;
const StyledName = styled.p`
font-size: var(--font-size-xl);
line-height: 1.4;
margin: 0;
padding: 0px;
`;
export const ProfileName = (props: { profileName: string; onClick: () => void }) => {
const { profileName, onClick } = props;
return (
{profileName}
);
};