// Copyright (c) Meta Platforms, Inc. and affiliates. 'use client'; import {useImperativeAlertDialog} from '@astryxdesign/core/AlertDialog'; import * as stylex from '@stylexjs/stylex'; import {useContainerReveal} from '@astryxdesign/core/hooks'; import {Button} from '@astryxdesign/core/Button'; import {Card} from '@astryxdesign/core/Card'; import {Icon} from '@astryxdesign/core/Icon'; import {Item} from '@astryxdesign/core/Item'; import {Stack} from '@astryxdesign/core/Layout'; import {Text} from '@astryxdesign/core/Text'; import {useToast} from '@astryxdesign/core/Toast'; import { PencilIcon as EditIcon, TrashIcon as DeleteIcon, } from '@heroicons/react/24/outline'; const styles = stylex.create({ intro: { paddingInline: 12, paddingBottom: 8, }, }); function FileRow({ name, onDelete, }: { name: string; onDelete: (name: string) => void; }) { // Destructure the two prop getters. Spreading getContainerProps() on the row // gives it a scoped hover/focus-within trigger; getContentRevealProps() hides // the actions at rest and reveals them when the row is hovered or focused. const {getContainerProps, getContentRevealProps} = useContainerReveal(); const showToast = useToast(); return (