text: "use strict";
  
  exports.__esModule = true;
  exports.gridRowNestedBehavior = void 0;
  
  var _attributes = require("../../attributes");
  
  var _types = require("../../focusZone/types");
  
  var _keyboardKey = require("../../keyboard-key");
  
  var _gridCellBehavior = require("./gridCellBehavior");
  
  /**
   * @specification
   * Adds role='row'.
   * Adds attribute 'data-is-focusable=true' to 'root' slot.
   * Adds attribute 'aria-selected=true' based on the property 'selected'. Based on this screen readers will recognize the selected state of the item.
   * Focus can be moved inside a child component with embeded inner FocusZone by pressing a specified key.
   * Provides arrow key navigation in horizontal direction.
   * Triggers 'performClick' action with 'Enter' or 'Spacebar' on 'root'.
   * Triggers 'unsetRowTabbable' action using 'shiftKey' + 'Tab' key on 'root'.
   * Applies 'gridCellBehavior' for 'cell' child component.
   */
  var gridRowNestedBehavior = function gridRowNestedBehavior(props) {
    var _root;
  
    return {
      attributes: {
        root: (_root = {}, _root[_attributes.IS_FOCUSABLE_ATTRIBUTE] = true, _root.role = 'row', _root['aria-selected'] = props.selected, _root)
      },
      focusZone: {
        props: {
          shouldEnterInnerZone: function shouldEnterInnerZone(event) {
            return (0, _keyboardKey.getCode)(event) === _keyboardKey.keyboardKey.Enter;
          },
          direction: _types.FocusZoneDirection.horizontal
        }
      },
      keyActions: {
        root: {
          unsetRowTabbable: {
            keyCombinations: [{
              keyCode: _keyboardKey.keyboardKey.Tab,
              shiftKey: true
            }]
          },
          performClick: {
            keyCombinations: [{
              keyCode: _keyboardKey.keyboardKey.Enter
            }, {
              keyCode: _keyboardKey.SpacebarKey
            }]
          }
        }
      },
      childBehaviors: {
        cell: _gridCellBehavior.gridCellBehavior
      }
    };
  };
  
  exports.gridRowNestedBehavior = gridRowNestedBehavior;
  //# sourceMappingURL=gridRowNestedBehavior.js.map
  