<div class="modal fade" id="editTrader{{ $trader->id }}">
    <div class="modal-dialog modal-lg">
        <form method="POST" action="{{ route('admin.copytraders.edit') }}" class="modal-content" enctype="multipart/form-data">
            @csrf
            <input type="hidden" name="id" value="{{ $trader->id }}">

            <div class="modal-header">
                <h5>Edit Trader</h5>
                <button type="button" class="btn-close" data-bs-dismiss="modal"></button>
            </div>

            <div class="modal-body row g-3">
                <div class="col-md-6">
                    <label>Name</label>
                    <input name="name" value="{{ $trader->name }}" class="form-control">
                </div>

                <div class="col-md-6">
                    <label>Title</label>
                    <input name="title" value="{{ $trader->title }}" class="form-control">
                </div>

                <div class="col-12">
                    <label>Description</label>
                    <textarea name="description" class="form-control">{{ $trader->description }}</textarea>
                </div>

                <div class="col-md-6">
                    <label>Price</label>
                    <input name="price" value="{{ $trader->price }}" class="form-control">
                </div>

                <div class="col-md-6">
                    <label>Return Rate (%)</label>
                    <input name="return_rate" value="{{ $trader->return_rate }}" class="form-control">
                </div>

                <div class="col-md-6">
                    <label>Followers</label>
                    <input name="followers" value="{{ $trader->followers }}" class="form-control">
                </div>

                <div class="col-md-6">
                    <label>Profit Share (%)</label>
                    <input name="profit_share" value="{{ $trader->profit_share }}" class="form-control">
                </div>

                <div class="col-md-6">
                    <label>Verified</label>
                    <select name="verified" class="form-select">
                        <option value="1" {{ $trader->verified ? 'selected' : '' }}>Yes</option>
                        <option value="0" {{ !$trader->verified ? 'selected' : '' }}>No</option>
                    </select>
                </div>

                <div class="col-md-6">
                    <label>Status</label>
                    <select name="is_active" class="form-select">
                        <option value="1" {{ $trader->is_active ? 'selected' : '' }}>Active</option>
                        <option value="0" {{ !$trader->is_active ? 'selected' : '' }}>Inactive</option>
                    </select>
                </div>

                <div class="col-md-6">
                    <label>Avatar</label>
                    <input type="file" name="avatar" class="form-control">
                    <img src="{{asset('uploads/traders/'.$trader->avatar)}}" width="100">
                </div>
            </div>

            <div class="modal-footer">
                <button class="btn btn-primary">Update</button>
            </div>
        </form>
    </div>
</div> 
