import WithDraggable from "@/components/common/draggable/withDraggable";
import RoofModuleOptionTab01 from "./RoofModuleOptionTab01";
import { useState } from "react";
import RoofModuleOptionTab02 from "./RoofModuleOptionTab02";
import RoofModuleOptionTab03 from "./RoofModuleOptionTab03";

export default function RoofModuleOption(){
    const [tabNum, setTabNum] = useState(1);
    return(
        <WithDraggable isShow={true} size={'ll'}>
                <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 === 2 || tabNum === 3 ? 'act': ''}`}></span>
                        <div className={`module-tab-bx ${tabNum === 2 || tabNum === 3 ? 'act': ''}`}>モジュール設定</div>
                        <span className={`tab-arr ${ tabNum === 3 ? 'act': ''}`}></span>
                        <div className={`module-tab-bx ${tabNum === 3 ? 'act': ''}`}>モジュールの配置</div>
                    </div>
                    {tabNum === 1 && <RoofModuleOptionTab01 setTabNum={setTabNum}/>}
                    {tabNum === 2 && <RoofModuleOptionTab02 setTabNum={setTabNum}/>}
                    {tabNum === 3 && <RoofModuleOptionTab03 setTabNum={setTabNum}/>}
                </div>
                <div className="modal-foot handle"></div>
        </WithDraggable>
    )
}