<% require_relative "drag_and_drop/drag_and_drop" %>
data-input-tag="<%= comp.tag %>" <% end %> <%= draggable_attributes(comp) %> <%= drop_zone_attributes(comp) %> class="v-card card-<%= comp.id %> mdc-card <%= 'v-actionable' if comp.events && !comp.draggable %> <%= 'v-dnd-draggable' if comp.draggable %> <%= 'v-card-selected' if comp.selected %> <%= comp.css_class.join(' ') %> <%= color_classname(comp, 'background-', :background_color)%>" style="<%= "width: #{comp.width};" if comp.width%> <%= "height: #{comp.height};" if comp.height %> <%= color_style(comp, 'background-', :background_color) %>" <%= erb :"components/event", :locals => {comp: comp, events: comp.events, parent_id: comp.event_parent_id} %> data-is-container> <%= erb(:"components/progress", :locals => {:comp => comp.progress}) if comp.progress && includes_one?(Array(comp.progress.position), %i(top both)) %> <% if comp.media %>
<%= "height: #{comp.media.height};" if comp.media.height %> <%= "background-color: #{comp.media.color};" if comp.media.color %>"> <%= erb :"components/render", :locals => {:components => comp.media.components, :scope => nil} %> <%= erb :"components/button", :locals => {:comp => comp.media.button, class_name: "v-card__media-menu"} %> <%= erb :"components/image", :locals => {:comp => comp.media.image, class_name: 'v-card-media-image'} %> <%= erb :"components/avatar", :locals => {:comp => comp.media.avatar, class_name: 'v-card-media-avatar'} %> <%= erb :"components/headline", :locals => {:comp => comp.media.title, class_name: "v-card-title"} %> <%= erb :"components/headline", :locals => {:comp => comp.media.subtitle, class_name: "v-card-title"} %>
<% end %>
"> <% if comp.components.any? %>
"> <%= erb :"components/render", :locals => {:components => comp.components, :scope => nil} %>
<% end %> <% if comp.actions&.buttons action_buttons = comp.actions.buttons.select { |b| !eq(b.button_type, :icon) } action_icons = comp.actions.buttons.select { |b| eq(b.button_type, :icon) } %>
<% action_buttons.each do |button| %> <%= erb :"components/button", :locals => {:comp => button, class_name: 'mdc-card__action mdc-card__action--button'} %> <% end %>
<% action_icons.each do |button| %> <%= erb :"components/button", :locals => {:comp => button, class_name: 'mdc-card__action mdc-card__action--icon'} %> <% end %> <% comp.actions.switches.each do |switch| %> <%= erb :"components/switch", :locals => {:comp => switch, class_name: 'mdc-card__action'} %> <% end %>
<% end %>
<%= erb(:"components/progress", :locals => {:comp => comp.progress}) if comp.progress && includes_one?(Array(comp.progress.position), %i(bottom both)) %>