import { useRef } from 'react';
import * as Popover from '@radix-ui/react-popover';
export function NoImage() {
return (
);
}
export const AssistantAvatar = ({
url,
progress = 1,
}: {
url?: string;
progress: number; // between 0 and 1
}) => {
const radius = 55; // Radius of the SVG circle
const circumference = 2 * Math.PI * radius;
// Calculate the offset based on the loading progress
const offset = circumference - progress * circumference;
const circleCSSProperties = {
transition: 'stroke-dashoffset 0.3s linear',
};
return (

{progress < 1 && (
)}
);
};
export function AvatarMenu({
handleFileChange,
}: {
handleFileChange: (event: React.ChangeEvent) => void;
}) {
const fileInputRef = useRef(null);
const onItemClick = () => {
if (fileInputRef.current) {
fileInputRef.current.value = '';
}
fileInputRef.current?.click();
};
return (
Upload Photo
{/*
Use DALLĀ·E
*/}
);
}