<section class="movie-details">
  <div class="image">
    <%= image_tag @movie.image_file_name %>
  </div>
  <div class="details">
    <h1><%= @movie.title %></h1>
    <h2>
      <%= year_of(@movie) %> &bull; <%= @movie.rating %>
    </h2>
    <p>
      <%= @movie.description %>
    </p>
    <table>
      <tr>
        <th>Director:</th>
        <td><%= @movie.director %></td>
      </tr>
      <tr>
        <th>Duration:</th>
        <td><%= @movie.duration %></td>
      </tr>
      <tr>
        <th>Total Gross:</th>
        <td><%= total_gross(@movie) %></td>
      </tr>
    </table>
    <section class="admin">
      <%= link_to "Edit", edit_movie_path(@movie), class: "button" %>
      <%= link_to "Delete", movie_path(@movie), class: "button", data: { turbo_method: :delete, turbo_confirm: "Are you sure?" } %>
    </section>
  </div>
</section>
