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

const buttonMenu = [
    {id: 1, name: '軒'},
    {id: 2, name: 'ケラバ'},
    {id: 3, name: '漂流'},
]

export default function ManualRoofShape(){
    const [buttonAct, setButtonAct] = useState(1);
    return(
        <WithDraggable isShow={true}>
            <div className={`modal-pop-wrap xxm`}>
                <div className="modal-head">
                <h1 className="title">屋根形状の設定</h1>
                    <button className="modal-close">닫기</button>
                </div>
                <div className="modal-body">
                    <div className="modal-btn-wrap">
                        {buttonMenu.map((item) => (
                            <button 
                            className={`btn-frame modal ${buttonAct === item.id ? 'act' : ''}`} 
                            onClick={() => setButtonAct(item.id)}
                            >
                                {item.name}
                            </button>
                        ))}
                    </div>
                    <div className="modal-bottom-border-bx">
                        <div className="setting-tit">設定</div>
                        <div className="discrimination-box">
                            {buttonAct === 1 && <ManualTab01/>}
                            {buttonAct === 2 && <ManualTab01/>}
                            {buttonAct === 3 && <ManualTab01/>}
                        </div>
                        <div className="grid-btn-wrap">
                            <button className="btn-frame sub-tab mr5">一変戦に戻る</button>
                            <button className="btn-frame sub-tab act">適用</button>
                        </div>
                    </div>
                    <div className="grid-btn-wrap">
                        <button className="btn-frame modal act">設定完了</button>
                    </div>
                </div>
            </div>
        </WithDraggable>
    )
}