'use client'

import { usePopupController } from '@/store/popupController'
import { useSessionStore } from '@/store/session'

export default function MemberInformationPopup() {
  const popupController = usePopupController()
  const { session } = useSessionStore()

  return (
    <div className="modal-popup">
      <div className="modal-dialog">
        <div className="modal-content">
          <div className="modal-header">
            <div className="modal-header-inner">
              <div className="modal-name-wrap">
                <div className="modal-img">
                  <img src="/assets/images/layout/modal_header_icon.svg" alt="" />
                </div>
                <div className="modal-name">会員情報</div>
              </div>
              <button className="modal-close" onClick={() => popupController.setMemberInfomationPopup(false)}></button>
            </div>
          </div>
          <div className="modal-body">
            <div className="member-infor-form-wrap">
              <div className="data-input-form-bx">
                <div className="data-input-form-tit">名前</div>
                <input type="text" className="input-frame" defaultValue={session.userNm ?? ''} disabled />
              </div>
              <div className="data-input-form-bx">
                <div className="data-input-form-tit">ユーザーID </div>
                <input type="text" className="input-frame" defaultValue={session.userId ?? ''} disabled />
              </div>
              <div className="data-input-form-bx">
                <div className="data-input-form-tit">メールアドレス</div>
                <input type="text" className="input-frame" defaultValue={session.email ?? ''} disabled />
              </div>
              <div className="data-input-form-bx">
                <div className="data-input-form-tit">電話番号</div>
                <input type="text" className="input-frame" defaultValue={session.telNo ?? ''} disabled />
              </div>
              <div className="data-input-form-bx">
                <div className="data-input-form-tit">販売店名</div>
                <input type="text" className="input-frame" defaultValue={'Interplug'} disabled />
              </div>
              <div className="data-input-form-bx">
                <div className="data-input-form-tit">建設ID</div>
                <input type="text" className="input-frame" defaultValue={session.builderNo ?? ''} disabled />
              </div>
            </div>
            <button className="btn-frame n-blue icon">
              パスワードリセット<i className="btn-arr"></i>
            </button>
          </div>
        </div>
      </div>
    </div>
  )
}
