import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
/*!
 * Copyright (c) Microsoft. All rights reserved.
 * Licensed under the MIT license. See LICENSE file in the project.
 */ import { DocumentCardTitle, TooltipHost } from '@fluentui/react';
import { memo } from 'react';
import { Card, icons, PreviewIcon, styles } from './TableCard.styles.js';
export const TableCard = /*#__PURE__*/ memo(function TableCard({ index , tableName , isSelected , onSelect ,  }) {
    return /*#__PURE__*/ _jsx(TooltipHost, {
        content: 'Preview table',
        children: /*#__PURE__*/ _jsxs(Card, {
            isSelected: isSelected(tableName),
            onClick: ()=>onSelect?.(tableName),
            children: [
                /*#__PURE__*/ _jsx(DocumentCardTitle, {
                    styles: styles.title,
                    showAsSecondaryTitle: true,
                    title: tableName
                }),
                /*#__PURE__*/ _jsx(PreviewIcon, {
                    iconName: icons.preview.iconName
                })
            ]
        })
    }, index);
});
