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 { memo } from 'react';
import { DetailText } from './DetailText.js';
import { TableCard } from './TableCard.js';
import { useIsTableSelected } from './TableList.hooks.js';
import { ListContainer } from './TableListBar.styles.js';
export const TableList = /*#__PURE__*/ memo(function TablesList({ tables , onSelect , selected ,  }) {
    const isSelected = useIsTableSelected(selected);
    return /*#__PURE__*/ _jsxs(ListContainer, {
        children: [
            tables.map((table, index)=>{
                return /*#__PURE__*/ _jsx(TableCard, {
                    tableName: table.id,
                    index: index,
                    isSelected: isSelected,
                    onSelect: onSelect
                }, index);
            }),
            !tables.length && /*#__PURE__*/ _jsx(DetailText, {
                text: "Input tables will show here"
            })
        ]
    });
});
