import Block from '../../Primitives/Block/Block'
import {
XIcon,
FileTextIcon,
FilePdfIcon,
FileCsvIcon,
FileImageIcon,
FileIcon,
} from '@phosphor-icons/react'
import { ChatInputV2TokensType } from './ChatInputV2.tokens'
import { ChatInputV2AttachedFile } from './ChatInputV2.types'
import {
ButtonV2,
ButtonV2Size,
ButtonV2SubType,
ButtonV2Type,
} from '../../ButtonV2'
type ChatInputTagV2Props = {
text: string
tokens: ChatInputV2TokensType['container']['tagContainer']
/** Fired after the remove control handles `stopPropagation` (button). */
onRemove: () => void
/** Fired after the file-name control handles `preventDefault` / `stopPropagation` (button). */
onFileClick: () => void
file: ChatInputV2AttachedFile
}
const ChatInputTagV2 = ({
file,
text,
tokens,
onRemove,
onFileClick,
}: ChatInputTagV2Props) => {
const getFileTypeIcon = (fileType: ChatInputV2AttachedFile['type']) => {
switch (fileType) {
case 'image':
return
case 'pdf':
return
case 'csv':
return
case 'text':
return
default:
return
}
}
return (
{getFileTypeIcon(file.type)}
{
e.preventDefault()
e.stopPropagation()
onFileClick()
}}
/>
{
e.stopPropagation()
onRemove()
}}
leftSlot={{
slot: ,
}}
/>
)
}
export default ChatInputTagV2