import { useSortable } from "@dnd-kit/sortable" import { CSS } from "@dnd-kit/utilities" import { DotsSix, Eye, EyeSlash } from "@medusajs/icons" import { IconButton, clx } from "@medusajs/ui" import { ReactNode } from "react" import { useTranslation } from "react-i18next" import type { LayoutControlSize } from "./types" /** * An entry's rendered content plus a placeholder that appears (via the * `peer`/`:empty` pair) only when that content produces no DOM — e.g. a section * that exists solely while an edit is pending. Keeps such an entry a visible, * labeled card rather than collapsing to a 0-height row. Shared by the in-place * `SortableEntry` and the `DragOverlay` ghost so the two never drift. * * `empty:hidden` collapses the content box when it renders nothing so it stops * reserving height — otherwise a layout that stretches the entry (e.g. a grid * equalizing row heights) would size the empty content to the full cell and * stack the placeholder below it, showing two boxes for one empty entry. */ export function EntryContent({ children, className, placeholderClassName, }: { children: ReactNode className?: string placeholderClassName?: string }) { const { t } = useTranslation() return ( <>