import {ErrorOutlineIcon} from '@sanity/icons/ErrorOutline'
import {InfoOutlineIcon} from '@sanity/icons/InfoOutline'
import {Dialog, Box, Text, Button} from '@sanity/ui'
import {Tooltip} from '@sanity/ui/tooltip'
import {useCallback, useState} from 'react'
/**
* #### Information Icon and Dialogue with Structure Details
* Provide feedback on concepts that are at the limit of
* or have children beyond the supported hierarchy depth
*/
export const StructureDetailDialogue = ({
message,
title,
type,
}: {
message: string
title: string
type: 'info' | 'warn' | 'error'
}) => {
const [open, setOpen] = useState(false)
const onClose = useCallback(() => setOpen(false), [])
const onOpen = useCallback(() => setOpen(true), [])
const toneMap = {
info: 'default' as const,
warn: 'caution' as const,
error: 'critical' as const,
}
return (
<>
{title}
}
fallbackPlacements={['right', 'left']}
placement="top"
portal
>
{open && (
)}
>
)
}