<form class="modal-form form-prevent-multiple-submits" action="{{ route('my-page.member-edit.update', $member['Id']) }}" method="POST">
    @csrf
    <div class="form-title">
        <h3>회원정보 변경</h3>
    </div>
    <div class="form-group">
        <label class="form-label">이메일</label>
        <input class="form-control" type="text" value="{{ $member['C4'] }}" disabled>
    </div>
    <div class="form-group">
        <label class="form-label">이름</label>
        <input class="form-control" type="text" name="first_name" value="{{ $member['C7'] }}" placeholder="이름을 입력하세요." required>
    </div>
    @if ($member['C12'] === '1')
        @php
            $companyJson = json_decode($member['T1'], true);
        @endphp
        <div class="form-group">
            <label class="form-label">사업자번호</label>
            <input class="form-control" type="text" name="tax_no" value="{{ $member['C17'] }}" placeholder="사업자번호를 입력하세요." required>
        </div>

        <input type="hidden" name="van_id" value="{{ $companyJson['VanId'] ?? '' }}">
        <input type="hidden" name="van_pw" value="{{ $companyJson['VanPw'] ?? '' }}">

        <div class="form-group">
            <label class="form-label">VAN사 종류</label>
            <select class="form-control" name="van">
                <option value="">사용중인 카드 단말기 선택</option>
                @foreach(['한국정보통신(KICC)', '나이스정보통신', 'KSNET',
                '스마트로', 'KIS정보통신', '퍼스트데이타', 'KOVAN', 'JT NET',
                '다우데이타', '한국사이버결제(KCP)', 'KOCES', 'SPC', '금융결제원' ] as $title)
                    <option value="{{ $title }}" {{ $companyJson['Van'] == $title ? "selected" : "" }}>
                        {{ $title }}
                    </option>
                @endforeach
            </select>
        </div>
    @endif
    <button class="form-btn button-prevent-multiple-submits save-prev-scroll-submits" type="submit">
        <i class="spinner fa fa-spinner fa-spin"></i>
        저장
    </button>
</form>

@once

@endonce
