// src/views/Company/components/LoadingState.tsx
// 统一的加载状态组件 - 黑金主题

import React from "react";
import { Center, VStack, Spinner, Text } from "@chakra-ui/react";

// 黑金主题配置
const THEME = {
  gold: "#D4AF37",
  textSecondary: "gray.400",
};

interface LoadingStateProps {
  message?: string;
  height?: string;
}

/**
 * 统一的加载状态组件（黑金主题）
 *
 * 用于所有一级 Tab 的 loading 状态展示
 */
const LoadingState: React.FC<LoadingStateProps> = ({
  message = "加载中...",
  height = "300px",
}) => {
  return (
    <Center h={height}>
      <VStack spacing={4}>
        <Spinner
          size="xl"
          color={THEME.gold}
          thickness="4px"
          speed="0.65s"
        />
        <Text fontSize="sm" color={THEME.textSecondary}>
          {message}
        </Text>
      </VStack>
    </Center>
  );
};

export default LoadingState;
