<%
  row = cell(:elements, :row).new
  block = cell(:elements, :block).new(class: 'xs-12 sm-12 md-12')
  code = cell(:elements, :code).new
  table = cell(:elements, :table, :container).new
%>

<!-- PRESENTATION -->
<%=raw row.open %>

  <%=raw block.open %>

    <%=raw cell(:elements, :title).new(label: 'Cells Elements: Table row') %>

    <p>A table row should be used to render a single table row.</p>

  <%=raw block.close %>

<%=raw row.close %>
<!-- / PRESENTATION -->

<hr>
<%=raw cell(:elements, :title).new(label: 'Normal Table row', size: 3) %>

<%=raw row.open %>

  <%=raw block.open %>

    <%=raw table.open %>

    <%=raw cell(:elements, :table, :head).new(labels: ['Name', 'Last login']) %>

    <% table_body = cell(:elements, :table, :body).new %>

    <%=raw table_body.open %>

      <%=raw cell(:elements, :table, :row).new(labels: ['Pippo baudo', 'Two days ago']) %>

      <%=raw cell(:elements, :table, :row).new(labels: ['Mario Rossi', 'Last week']) %>

    <%=raw table_body.close %>

  <%=raw table.close %>
    
  <%=raw block.close %>

<%=raw row.close %>

<!-- CODE SECTION -->
<%=raw row.open %>

<%=raw block.open %>

<%=raw cell(:elements, :title).new(label: 'Code', size: 6) %>

<%=raw code.open %>

<%= erb_open_tag %>=raw cell(:elements, :table, :row).new(labels: ['Pippo baudo', 'Two days ago']) <%= erb_close_tag %>

<%= erb_open_tag %>=raw cell(:elements, :table, :row).new(labels: ['Mario Rossi', 'Last week']) <%= erb_close_tag %>

<%=raw code.close %>

<%=raw block.close %>

<%=raw row.close %>
<!-- / CODE SECTION -->

<hr>
<%=raw cell(:elements, :title).new(label: 'Table row with boolean labels', size: 3) %>

<%=raw row.open %>

  <%=raw block.open %>

    <%=raw table.open %>

    <%=raw cell(:elements, :table, :head).new(labels: ['Name', 'Last login']) %>

    <% table_body = cell(:elements, :table, :body).new %>

    <%=raw table_body.open %>

      <%=raw cell(:elements, :table, :row).new(labels: ['Pippo baudo', {type: 'boolean', value: true}]) %>

      <%=raw cell(:elements, :table, :row).new(labels: ['Mario Rossi', {type: 'boolean', value: false}]) %>

    <%=raw table_body.close %>

  <%=raw table.close %>
    
  <%=raw block.close %>

<%=raw row.close %>

<!-- CODE SECTION -->
<%=raw row.open %>

<%=raw block.open %>

<%=raw cell(:elements, :title).new(label: 'Code', size: 6) %>

<%=raw code.open %>

<%= erb_open_tag %>=raw cell(:elements, :table, :row).new(labels: ['Pippo baudo', {type: 'boolean', value: true}]) <%= erb_close_tag %>

<%= erb_open_tag %>=raw cell(:elements, :table, :row).new(labels: ['Mario Rossi', {type: 'boolean', value: false}]) <%= erb_close_tag %>

<%=raw code.close %>

<%=raw block.close %>

<%=raw row.close %>
<!-- / CODE SECTION -->

<hr>
<%=raw cell(:elements, :title).new(label: 'Table row with icon labels', size: 3) %>

<%=raw row.open %>

  <%=raw block.open %>

    <%=raw table.open %>

    <%=raw cell(:elements, :table, :head).new(labels: ['Name', 'Last login']) %>

    <% table_body = cell(:elements, :table, :body).new %>

    <%=raw table_body.open %>

      <%=raw cell(:elements, :table, :row).new(labels: ['Pippo baudo', {type: 'icon', value: 'battery-three-quarters'}]) %>

      <%=raw cell(:elements, :table, :row).new(labels: ['Mario Rossi', {type: 'icon', value: 'battery-quarter'}]) %>

    <%=raw table_body.close %>

  <%=raw table.close %>
    
  <%=raw block.close %>

<%=raw row.close %>

<!-- CODE SECTION -->
<%=raw row.open %>

<%=raw block.open %>

<%=raw cell(:elements, :title).new(label: 'Code', size: 6) %>

<%=raw code.open %>

<%= erb_open_tag %>=raw cell(:elements, :table, :row).new(labels: ['Pippo baudo', {type: 'icon', value: 'battery-three-quarters'}]) <%= erb_close_tag %>

<%= erb_open_tag %>=raw cell(:elements, :table, :row).new(labels: ['Mario Rossi', {type: 'icon', value: 'battery-quarter'}]) <%= erb_close_tag %>

<%=raw code.close %>

<%=raw block.close %>

<%=raw row.close %>
<!-- / CODE SECTION -->

<hr>
<%=raw cell(:elements, :title).new(label: 'Table row with button labels', size: 3) %>

<%=raw row.open %>

  <%=raw block.open %>

    <%=raw table.open %>

    <%=raw cell(:elements, :table, :head).new(labels: ['Name', 'Last login']) %>

    <% table_body = cell(:elements, :table, :body).new %>

    <%=raw table_body.open %>

      <% button = cell(:elements, :button).new(label: 'Show', url: '#') %>

      <%=raw cell(:elements, :table, :row).new(labels: ['Pippo baudo', {type: 'component', value: button}]) %>

      <%=raw cell(:elements, :table, :row).new(labels: ['Mario Rossi', {type: 'component', value: button}]) %>

    <%=raw table_body.close %>

  <%=raw table.close %>
    
  <%=raw block.close %>

<%=raw row.close %>

<!-- CODE SECTION -->
<%=raw row.open %>

<%=raw block.open %>

<%=raw cell(:elements, :title).new(label: 'Code', size: 6) %>

<%=raw code.open %>

<%= erb_open_tag %> button = cell(:elements, :button).new(label: 'Show', url: '#') <% erb_close_tag %>

<%= erb_open_tag %>=raw cell(:elements, :table, :row).new(labels: ['Pippo baudo', {type: 'component', value: button}]) <%= erb_close_tag %>

<%= erb_open_tag %>=raw cell(:elements, :table, :row).new(labels: ['Mario Rossi', {type: 'component', value: button}]) <%= erb_close_tag %>

<%=raw code.close %>

<%=raw block.close %>

<%=raw row.close %>
<!-- / CODE SECTION -->
