{{#if doRenderData}}
  <tr class="{{record.rowConfig.customClass}}">
    <td class="object-list-view-helper-column {{unless showHelperColumn "hidden"}}" style={{defaultPaddingStyle}}>
      <div class="hidden">{{record.key}}</div>
      {{#each customButtonsInRow as |customButtonInRow|}}
          <button
            type="button"
            class="ui {{customButtonInRow.buttonClasses}} button"
            title={{if customButtonInRow.buttonTitle customButtonInRow.buttonTitle}}
            {{action "customButtonInRowAction" customButtonInRow.buttonAction record.data}}>
            <i class={{customButtonInRow.buttonIcon}}></i>
          </button>
      {{/each}}
      {{#if showHelperColumn}}
        <div class="object-list-view-helper-column-cell">
          {{#if showAsteriskInRow}}
            <div class="cell asterisk-cell">
              <i class="asterisk small red icon {{unless record.data.hasDirtyAttributes "transparent"}}"></i>
            </div>
          {{/if}}
          {{#if showCheckBoxInRow}}
            <div class="cell">
              {{flexberry-checkbox
                readonly=(or (not record.rowConfig.canBeSelected) allSelect)
                onChange=(action selectRow record)
                value=record.selected
              }}
            </div>
          {{/if}}
          {{#if showEditButtonInRow}}
            <div class="cell">
              {{#if readonly}}
                <button
                  type="button"
                  class="ui ui-edit object-list-view-row-edit-button {{buttonClass}} disabled button"
                  title={{t "components.object-list-view.menu-in-row.edit-menu-item-title"}}
                  disabled="disabled">
                  <i class="edit icon"></i>
                </button>
              {{else}}
                <button
                  type="button"
                  class="ui ui-edit object-list-view-row-edit-button {{buttonClass}} button"
                  title={{t "components.object-list-view.menu-in-row.edit-menu-item-title"}}
                  {{action "onRowClick" record (hash column=null columnIndex=null rowEdit=true)}}>
                  <i class="edit icon"></i>
                </button>
              {{/if}}
            </div>
          {{/if}}
          {{#if showPrototypeButtonInRow}}
            <div class="cell">
              {{#if readonly}}
                <button
                  type="button"
                  class="ui ui-edit object-list-view-row-prototype-button {{buttonClass}} disabled button"
                  title={{t "components.object-list-view.menu-in-row.prototype-menu-item-title"}}
                  disabled="disabled">
                  <i class="copy icon"></i>
                </button>
              {{else}}
                <button
                  type="button"
                  class="ui ui-edit object-list-view-row-prototype-button {{buttonClass}} button"
                  title={{t "components.object-list-view.menu-in-row.prototype-menu-item-title"}}
                  {{action createNewByPrototype (get record "data.id")}}>
                  <i class="copy icon"></i>
                </button>
              {{/if}}
            </div>
          {{/if}}
          {{#if showDeleteButtonInRow}}
            <div class="cell">
              {{#if (or readonly (not record.rowConfig.canBeDeleted))}}
                <button
                  type="button"
                  class="ui ui-delete object-list-view-row-delete-button {{buttonClass}} disabled button"
                  title={{t "components.object-list-view.menu-in-row.delete-menu-item-title"}}
                  disabled="disabled">
                  <i class="minus icon"></i>
                </button>
              {{else}}
                <button
                  type="button"
                  class="ui ui-delete object-list-view-row-delete-button {{buttonClass}} button"
                  title={{t "components.object-list-view.menu-in-row.delete-menu-item-title"}}
                  {{action deleteRow record}}>
                  <i class="minus icon"></i>
                </button>
              {{/if}}
            </div>
          {{/if}}
        </div>
      {{/if}}
    </td>
    {{#each columns as |column index|}}
      <td
        {{action "onRowClick" record (hash column=column columnIndex=index) preventDefault=false}}
        class="field {{if (and showValidationMessages (get record.data (concat "errors." column.propName ".length"))) "error"}} {{if (array-contains overflowedComponents column.cellComponent.componentName) " overflowed-cell"}}"
        style={{if (and (not index) inHierarchicalMode) hierarchicalIndentStyle defaultPaddingStyle}}>
        {{#if column.cellComponent.componentName}}
          {{#if inHierarchicalMode}}
            {{#component column.cellComponent.componentName
              dynamicProperties=column.cellComponent.componentProperties
              relatedModel=record.data
              value=(mut (get record.data column.propName))
              readonly=(readonly-cell record.rowConfig.readonlyColumns column.propName readonly column.cellComponent.componentProperties.readonly)
              required=required
              componentName=(concat "(" folvComponentName "_" column.cellComponent.componentName "_" column.propName ")")
            }}
              {{#if (and (not index) inHierarchicalMode (or isParentRecord hasRecords))}}
                <button
                  type="button"
                  class="ui button hierarchy-expand icon mini compact {{if _recordsIsLoading "loading"}} {{buttonClass}}"
                  title={{t (concat "components.object-list-view.hierarchy-buttons." (if _expanded "minus" "plus") "-button-title")}}
                  {{action (if recordsLoaded "expand" "loadChildRecords") bubbles=false}}
                >
                  <i class="{{if _expanded "minus" "plus"}} hierarchy-expand icon"></i>
                </button>
              {{/if}}
            {{/component}}
          {{else}}
            {{component column.cellComponent.componentName
              dynamicProperties=column.cellComponent.componentProperties
              relatedModel=record.data
              value=(mut (get record.data column.propName))
              readonly=(readonly-cell record.rowConfig.readonlyColumns column.propName readonly column.cellComponent.componentProperties.readonly)
              required=required
              componentName=(concat "(" folvComponentName "_" column.cellComponent.componentName "_" column.propName ")")
              canFixElement=(or (eq column.cellComponent.componentName "flexberry-dropdown") (eq column.cellComponent.componentName "flexberry-lookup"))
            }}
            {{#if showValidationMessages}}
              {{flexberry-validationmessage
                error=(get record.data (concat "errors." column.propName))
                pointing="pointing"
              }}
            {{/if}}
          {{/if}}
        {{else}}
          <div class="oveflow-text">
            {{#if (and (not index) inHierarchicalMode (or isParentRecord hasRecords))}}
              <button
                type="button"
                class="ui button hierarchy-expand icon mini compact {{if _recordsIsLoading "loading"}} {{buttonClass}}"
                title={{t (concat "components.object-list-view.hierarchy-buttons." (if _expanded "minus" "plus") "-button-title")}}
                {{action (if recordsLoaded "expand" "loadChildRecords") bubbles=false}}
              >
                <i class="{{if _expanded "minus" "plus"}} hierarchy-expand icon"></i>
              </button>
            {{/if}}
            {{get-formatted record.data column.propName
              dateFormat=dateFormat
              moment=moment
            }}
          </div>
        {{/if}}
      </td>
    {{/each}}
    {{#if showMenuColumn}}
      <td class="object-list-view-menu" style={{defaultPaddingStyle}}>
        <div class="right pointing ui icon dropdown button">
          <i class="list layout icon"></i>
          <div class="left menu">
            {{#if showEditMenuItemInRow}}
              {{#if readonly}}
                <div class="item disabled edit-menu">
                  <i class="edit icon"></i>
                  <span>{{t "components.object-list-view.menu-in-row.edit-menu-item-title"}}</span>
                </div>
              {{else}}
                <div class="item edit-menu" {{action "onRowClick" record (hash column=null columnIndex=null rowEdit=true)}}>
                  <i class="edit icon"></i>
                  <span>{{t "components.object-list-view.menu-in-row.edit-menu-item-title"}}</span>
                </div>
              {{/if}}
            {{/if}}
            {{#if showPrototypeMenuItemInRow}}
              {{#if readonly}}
                <div class="item disabled prototype-menu">
                  <i class="copy icon"></i>
                  <span>{{t "components.object-list-view.menu-in-row.prototype-menu-item-title"}}</span>
                </div>
              {{else}}
                <div class="item prototype-menu" {{action createNewByPrototype (get record "data.id")}}>
                  <i class="copy icon"></i>
                  <span>{{t "components.object-list-view.menu-in-row.prototype-menu-item-title"}}</span>
                </div>
              {{/if}}
            {{/if}}
            {{#if showDeleteMenuItemInRow}}
              {{#if (or readonly (not record.rowConfig.canBeDeleted))}}
                <div class="item disabled delete-menu">
                  <i class="trash icon"></i>
                  <span>{{t "components.object-list-view.menu-in-row.delete-menu-item-title"}}</span>
                </div>
              {{else}}
                <div class="item delete-menu" {{action deleteRow record}}>
                  <i class="trash icon"></i>
                  <span>{{t "components.object-list-view.menu-in-row.delete-menu-item-title"}}</span>
                </div>
              {{/if}}
            {{/if}}
            {{#each menuInRowAdditionalItems as |menuItem|}}
              <div class="item" {{action sendMenuItemAction menuItem.actionName record.data}}>
                <i class="{{menuItem.icon}}"></i>
                <span>{{menuItem.title}}</span>
              </div>
            {{/each}}
          </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
        sendMenuItemAction=sendMenuItemAction
        menuInRowAdditionalItems=menuInRowAdditionalItems
        showHelperColumn=showHelperColumn
        defaultRowConfig=defaultRowConfig
        showValidationMessages=showValidationMessages
        showAsteriskInRow=showAsteriskInRow
        showCheckBoxInRow=showCheckBoxInRow
        showEditButtonInRow=showEditButtonInRow
        showPrototypeButtonInRow=showPrototypeButtonInRow
        showDeleteButtonInRow=showDeleteButtonInRow
        showEditMenuItemInRow=showEditMenuItemInRow
        showPrototypeMenuItemInRow=showPrototypeMenuItemInRow
        showDeleteMenuItemInRow=showDeleteMenuItemInRow
        isParentRecordPropertyName=isParentRecordPropertyName
        inHierarchicalMode=inHierarchicalMode
        inExpandMode=(unbound inExpandMode)
        loadRecords=loadRecords
        doRenderData=record.doRenderData
        rowClick=rowClick
        selectRow=selectRow
        createNewByPrototype=createNewByPrototype
        deleteRow=deleteRow
        _currentLevel=_currentLevel
        hierarchicalIndent=_hierarchicalIndent
        defaultLeftPadding=defaultLeftPadding
        overflowedComponents=overflowedComponents
        folvComponentName=folvComponentName
        hierarchyLoadedLevel=hierarchyLoadedLevel
        configurateRow=configurateRow
      }}
    {{/each}}
  {{/if}}
{{/if}}
