<tr class="{{record.rowConfig.customClass}}">
  <td class="object-list-view-helper-column {{unless showHelperColumn "hidden"}}">
    <div class="hidden">{{record.key}}</div>
    {{#if showHelperColumn}}
      <div class="object-list-view-helper-column-cell">
        {{#if showAsteriskInRow}}
          <div class="cell">
            <i class="asterisk small red icon {{unless record.data.hasDirtyAttributes "transparent"}}"></i>
          </div>
        {{/if}}
        {{#if showCheckBoxInRow}}
          <div class="cell">
            {{flexberry-checkbox
              readonly=(or readonly (not record.rowConfig.canBeSelected) allSelect)
              onChange=(action selectRow record)
              value=record.selected
            }}
          </div>
        {{/if}}
      </div>
    {{/if}}
  </td>
  <td
    {{action "onRowClick" record (hash column=columns) preventDefault=false}}
    style="padding-left:{{hierarchicalIndent}}px;">
    {{component singleColumnCellComponent.componentName
      model=record.data
      columns=columns
      showValidationMessages=showValidationMessages
      hasEditableValues=hasEditableValues
      dynamicProperties=singleColumnCellComponent.componentProperties
      readonly=readonly
    }}
    {{#if (and inHierarchicalMode hasRecords)}}
      <button type="button" class="ui button icon mini {{buttonClass}}" {{action "expand" bubbles=false}}>
        <i class="{{if _expanded "minus" "plus"}} hierarchy-expand icon"></i>
      </button>
    {{/if}}
    {{#if showEditButtonInRow}}
      <button
        type="button"
        class="ui ui-edit object-list-view-row-edit-button mobile {{buttonClass}} {{if readonly "disabled"}} button"
        disabled={{readonly}}
        {{action "onRowClick" record (hash column=null columnIndex=null rowEdit=true) bubbles=false}}>
        <i class="edit icon"></i>
      </button>
    {{/if}}
    {{#if showPrototypeButtonInRow}}
      <button
        type="button"
        class="ui ui-edit object-list-view-row-prototype-button mobile {{buttonClass}} {{if readonly "disabled"}} button"
        disabled={{readonly}}
        {{action createNewByPrototype (get record "data.id") bubbles=false}}>
        <i class="copy icon"></i>
      </button>
    {{/if}}
    {{#if showDeleteButtonInRow}}
      <button
        type="button"
        class="ui ui-edit object-list-view-row-delete-button mobile {{buttonClass}} {{if (or readonly (not record.rowConfig.canBeDeleted)) "disabled"}} button"
        disabled={{or readonly (not record.rowConfig.canBeDeleted)}}
        {{action deleteRow record bubbles=false}}>
        <i class="minus icon"></i>
      </button>
    {{/if}}
  </td>
  {{#if showMenuColumn}}
    <td class="object-list-view-menu">
      <div class="right pointing ui icon dropdown button">
        <i class="list layout icon"></i>
        <div class="left menu">
          {{#if showEditMenuItemInRow}}
            <div class="item" {{ action rowClick record }}>
              <i class="edit icon"></i>
              <span>{{t "components.object-list-view.menu-in-row.edit-menu-item-title"}}</span>
            </div>
          {{/if}}
          {{#if showDeleteMenuItemInRow}}
            <div class="item" {{ action deleteRow record }}>
              <i class="trash icon"></i>
              <span>{{t "components.object-list-view.menu-in-row.delete-menu-item-title"}}</span>
            </div>
          {{/if}}
        </div>
      </div>
    </td>
  {{/if}}
</tr>
{{#if (and _expanded inHierarchicalMode)}}
  {{#each records key="key" as |record|}}
    {{object-list-view-row
      record=record
      columns=columns
      readonly=readonly
      required=required
      showMenuColumn=showMenuColumn
      showHelperColumn=showHelperColumn
      defaultRowConfig=defaultRowConfig
      showValidationMessages=showValidationMessages
      showAsteriskInRow=showAsteriskInRow
      showCheckBoxInRow=showCheckBoxInRow
      showDeleteButtonInRow=showDeleteButtonInRow
      showEditButtonInRow=showEditButtonInRow
      showPrototypeButtonInRow=showPrototypeButtonInRow
      showEditMenuItemInRow=showEditMenuItemInRow
      showPrototypeMenuItemInRow=showPrototypeMenuItemInRow
      showDeleteMenuItemInRow=showDeleteMenuItemInRow
      isParentRecordPropertyName=isParentRecordPropertyName
      inHierarchicalMode=inHierarchicalMode
      inExpandMode=(unbound inExpandMode)
      singleColumnCellComponent=singleColumnCellComponent
      loadRecords=loadRecords
      rowClick=rowClick
      selectRow=selectRow
      deleteRow=deleteRow
      createNewByPrototype=createNewByPrototype
      _currentLevel=_currentLevel
      hierarchicalIndent=_hierarchicalIndent
      configurateRow=configurateRow
    }}
  {{/each}}
{{/if}}
