import WithDraggable from "@/components/common/draggable/withDraggable";
import { useState } from "react";
import CircuitStandTab01 from "./CircuitStandTab01";
import CircuitStandTab02 from "./CircuitStandTab02";
import CircuitStandTab03 from "./CircuitStandTab03";

export default function CircuitStandSetting(){
    const [tabNum, setTabNum] = useState(1);
    return(
        <WithDraggable isShow={true} size={'l-2'}>
                <div className="modal-head handle">
                    <h1 className="title">回路設定 </h1>
                    <button className="modal-close">닫기</button>
                </div>
                <div className="modal-body">
                <div className="left-bar handle"></div>
                <div className="right-bar handle"></div>
                <div className="roof-module-tab">
                        <div className={`module-tab-bx ${tabNum === 1 || tabNum === 2 || tabNum === 3 ? 'act': ''}`}>パワーコンディショナーを選択</div>
                        <span className={`tab-arr ${ tabNum === 3 ? 'act': ''}`}></span>
                        <div className={`module-tab-bx ${tabNum === 3 ? 'act': ''}`}>回路割当&#40;昇圧設定&#41;</div>
                    </div>
                    {tabNum === 1 && <CircuitStandTab01 setTabNum={setTabNum}/>}
                    {tabNum === 2 && <CircuitStandTab02 setTabNum={setTabNum}/>}
                    {tabNum === 3 && <CircuitStandTab03 setTabNum={setTabNum}/>}
                </div>
                <div className="modal-foot handle"></div>
        </WithDraggable>
    )
} 