/**
 * 产业链 Tab
 *
 * 包含：产业链分析（层级视图 + Sankey 流向图）
 */

import React, { memo } from 'react';
import TabPanelContainer from '@components/TabPanelContainer';
import { ValueChainCard } from '../components';
import type { ValueChainData } from '../types';

export interface ValueChainTabProps {
  valueChainData?: ValueChainData;
  cardBg?: string;
}

const ValueChainTab: React.FC<ValueChainTabProps> = memo(({
  valueChainData,
  cardBg,
}) => {
  return (
    <TabPanelContainer showDisclaimer>
      {valueChainData && (
        <ValueChainCard valueChainData={valueChainData} cardBg={cardBg} />
      )}
    </TabPanelContainer>
  );
});

ValueChainTab.displayName = 'ValueChainTab';

export default ValueChainTab;
