<%= content_tag :div, class: classes, style: style, data: data do %> <%= content_tag :div, class: class_names("pt-4 flex self-start items-center flex-shrink-0 w-48 px-6 uppercase font-semibold text-gray-500 text-sm", @field.get_html(:classes, view: view, element: :label), { "md:pt-4 md:w-full": stacked?, "h-full md:pt-0": !stacked?, "md:h-10 ": !stacked? && short?, "md:h-14 ": !stacked? && !short?, "md:w-48 xl:w-64": compact?, "md:w-64": !compact?, }), data: {slot: "label"} do %> <% if form.present? %> <%= form.label field.id, label %> <% else %> <%= field.name %> <% end %> <% if on_edit? && field.is_required? %> * <% end %> <% end %> <%= content_tag :div, class: class_names("flex-1 flex flex-row md:min-h-inherit py-2 px-6", @field.get_html(:classes, view: view, element: :content), { "pb-4": stacked?, }), data: {slot: "value"} do %>
<% if on_show? %> <% if field.value.blank? and dash_if_blank %> — <% else %> <%= content %> <% end %> <% elsif on_edit? %> <%= content %> <% if record.present? and record.errors.include? field.id %>
<%= record.errors.full_messages_for(field.id).to_sentence %>
<% end %> <% if help.present? %>
<%= sanitize help %>
<% end %> <% end %>
<% end %> <% if params[:avo_debug].present? %> <% end %> <% end %>