<turbo-stream action="replace" target="player-edit-modal"><template><turbo-frame id="player-edit-modal">
  <div class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 p-4">
    <div class="bg-white rounded-lg shadow-xl max-w-sm w-full p-6">
      <div class="flex items-center justify-between mb-4">
        <h3 class="text-lg font-semibold text-gray-900">Edit Player</h3>
        <a data-turbo-frame="player-edit-modal" class="text-gray-400 hover:text-gray-600" href="/swiss/events/5">
          <svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
          </svg>
</a>      </div>

      <form class="space-y-4" action="/swiss/events/5/players/239?game_session_id=43" accept-charset="UTF-8" method="post"><input type="hidden" name="_method" value="patch" autocomplete="off" /><input type="hidden" name="authenticity_token" value="oz5KgS6AmRzaBUjONia4oOTfW54CWjhH8RlBKvjrWH19O7ejJK-B2H8gmEilRdHj3oWHEHE3kXMyepzO-W1WZw" autocomplete="off" />
        <!-- Name -->
        <div>
          <label for="player_name" class="block text-sm font-medium text-gray-700 mb-1">Name</label>
          <input class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-lg" type="text" value="Wes" name="player[name]" id="player_name" />
        </div>

        <!-- Skill Rating -->
        <div data-controller="skill-rating" data-skill-rating-rating-value="3.5">
          <label class="block text-sm font-medium text-gray-700 mb-2">DUPR Rating</label>
          <div class="flex items-center justify-center gap-4">
            <button type="button"
                    data-action="click->skill-rating#decrement"
                    class="w-12 h-12 rounded-full bg-gray-200 hover:bg-gray-300 text-gray-700 font-bold text-xl flex items-center justify-center transition-colors">
              -
            </button>
            <span data-skill-rating-target="display" class="text-2xl font-bold text-gray-900 min-w-[4rem] text-center">
              3.50
            </span>
            <button type="button"
                    data-action="click->skill-rating#increment"
                    class="w-12 h-12 rounded-full bg-gray-200 hover:bg-gray-300 text-gray-700 font-bold text-xl flex items-center justify-center transition-colors">
              +
            </button>
          </div>
          <input autocomplete="off" data-skill-rating-target="input" type="hidden" value="3.5" name="player[skill_rating]" id="player_skill_rating" />
        </div>

        <!-- Submit -->
        <div class="pt-4">
          <button type="submit" class="w-full py-3 bg-blue-600 hover:bg-blue-700 text-white font-semibold rounded-lg transition-colors">
            Save Changes
          </button>
        </div>
</form>    </div>
  </div>
</turbo-frame></template></turbo-stream>