export default function MineSegment({
  tabIndex,
  setTabIndex,
}: {
  tabIndex: number;
  setTabIndex: (idx: number) => void;
}) {
  return (
    <section className="px-4 py-5 flex">
      <div
        className={`flex-1 h-10 rounded-l-md ${tabIndex === 0 ? 'btn-contained' : 'btn-elevated'}`}
        onClick={() => setTabIndex(0)}
      >
        测量数据
      </div>
      <div
        className={`flex-1 h-10 rounded-r-md ${tabIndex === 1 ? 'btn-contained' : 'btn-elevated'}`}
        onClick={() => setTabIndex(1)}
      >
        未上传数据
      </div>
    </section>
  );
}
