import Ext_grid_Panel from '../../Ext/grid/Panel.js';

export default class Ext_pivot_Grid extends Ext_grid_Panel {
  static PROPERTIES() { return [
    'actions',
    'activeChildTabIndex',
    'activeCounter',
    'activeItem',
    'alignOnScroll',
    'alignTarget',
    'allowDeselect',
    'allowFocusingDisabledChildren',
    'alwaysOnTop',
    'anchor',
    'anchorSize',
    'animateShadow',
    'animCollapse',
    'ariaAttributes',
    'ariaDescribedBy',
    'ariaLabel',
    'ariaLabelledBy',
    'autoDestroy',
    'autoEl',
    'autoLoad',
    'autoRender',
    'autoShow',
    'baseCls',
    'bbar',
    'bind',
    'bodyBorder',
    'bodyCls',
    'bodyPadding',
    'bodyStyle',
    'border',
    'bubbleEvents',
    'bufferedRenderer',
    'buttonAlign',
    'buttons',
    'childEls',
    'closable',
    'closeAction',
    'closeToolText',
    'cls',
    'clsGrandTotal',
    'clsGroupTotal',
    'collapsed',
    'collapsedCls',
    'collapseDirection',
    'collapseFirst',
    'collapseMode',
    'collapseToolText',
    'collapsible',
    'columnLines',
    'columns',
    'columnWidth',
    'componentCls',
    'componentLayout',
    'constrain',
    'constrainHeader',
    'constraintInsets',
    'constrainTo',
    'contentEl',
    'controller',
    'data',
    'defaultAlign',
    'defaultButton',
    'defaultButtonTarget',
    'defaultDockWeights',
    'defaultFocus',
    'defaultListenerScope',
    'defaults',
    'defaultType',
    'deferRowRender',
    'detachOnRemove',
    'disabled',
    'disabledCls',
    'disableSelection',
    'dock',
    'dockedItems',
    'draggable',
    'emptyText',
    'enableColumnHide',
    'enableColumnMove',
    'enableColumnResize',
    'enableColumnSort',
    'enableLoadMask',
    'enableLocking',
    'expandToolText',
    'fbar',
    'features',
    'fixed',
    'flex',
    'floatable',
    'floating',
    'focusableContainer',
    'focusCls',
    'focused',
    'focusOnToFront',
    'forceFit',
    'formBind',
    'frame',
    'frameHeader',
    'glyph',
    'header',
    'headerBorders',
    'headerOverCls',
    'headerPosition',
    'height',
    'hidden',
    'hideCollapseTool',
    'hideHeaders',
    'hideMode',
    'html',
    'icon',
    'iconAlign',
    'iconCls',
    'id',
    'inactiveChildTabIndex',
    'itemId',
    'items',
    'keyMap',
    'keyMapEnabled',
    'keyMapTarget',
    'layout',
    'lbar',
    'leadingBufferZone',
    'liquidLayout',
    'listeners',
    'liveDrag',
    'loader',
    'lockedGridConfig',
    'lockedViewConfig',
    'lockText',
    'maintainTitlePosition',
    'manageHeight',
    'margin',
    'maskDefaults',
    'maskElement',
    'matrix',
    'maxHeight',
    'maxWidth',
    'minButtonWidth',
    'minHeight',
    'minWidth',
    'modal',
    'modelValidation',
    'multiColumnSort',
    'nameable',
    'nameHolder',
    'normalGridConfig',
    'normalViewConfig',
    'numFromEdge',
    'overCls',
    'overlapHeader',
    'padding',
    'placeholder',
    'placeholderCollapseHideMode',
    'plugins',
    'preciseHeight',
    'publishes',
    'rbar',
    'reference',
    'referenceHolder',
    'region',
    'renderConfig',
    'renderData',
    'renderTo',
    'renderTpl',
    'reserveScrollbar',
    'resetFocusPosition',
    'resizable',
    'resizeHandles',
    'rowLines',
    'rowViewModel',
    'saveDelay',
    'scrollable',
    'sealedColumns',
    'selection',
    'selModel',
    'session',
    'shadow',
    'shadowOffset',
    'shareableName',
    'shim',
    'shrinkWrap',
    'shrinkWrapDock',
    'simpleDrag',
    'sortableColumns',
    'split',
    'startColGroupsCollapsed',
    'startRowGroupsCollapsed',
    'stateEvents',
    'stateful',
    'stateId',
    'store',
    'style',
    'subGridXType',
    'suspendLayout',
    'syncRowHeight',
    'tabGuard',
    'tabIndex',
    'tbar',
    'title',
    'titleAlign',
    'titleCollapse',
    'titlePosition',
    'titleRotation',
    'toFrontOnShow',
    'tools',
    'touchAction',
    'tpl',
    'tplWriteMode',
    'trailingBufferZone',
    'twoWayBindable',
    'ui',
    'uiCls',
    'unlockText',
    'userCls',
    'view',
    'viewConfig',
    'viewModel',
    'viewType',
    'weight',
    'width',
    'xtype',
  ]};
  static EVENTS() { return [
    {name:'activate', parameters:'sender'},
    {name:'add', parameters:'sender,component,index'},
    {name:'added', parameters:'sender,container,pos'},
    {name:'afterlayout', parameters:'sender,layout'},
    {name:'afterlayoutanimation', parameters:'sender'},
    {name:'afterrender', parameters:'sender'},
    {name:'beforeactivate', parameters:'sender'},
    {name:'beforeadd', parameters:'sender,component,index'},
    {name:'beforecellclick', parameters:'sender,td,cellIndex,record,tr,rowIndex,e'},
    {name:'beforecellcontextmenu', parameters:'sender,td,cellIndex,record,tr,rowIndex,e'},
    {name:'beforecelldblclick', parameters:'sender,td,cellIndex,record,tr,rowIndex,e'},
    {name:'beforecellkeydown', parameters:'sender,td,cellIndex,record,tr,rowIndex,e'},
    {name:'beforecellmousedown', parameters:'sender,td,cellIndex,record,tr,rowIndex,e'},
    {name:'beforecellmouseup', parameters:'sender,td,cellIndex,record,tr,rowIndex,e'},
    {name:'beforeclose', parameters:'panel'},
    {name:'beforecollapse', parameters:'p,direction,animate'},
    {name:'beforecontainerclick', parameters:'sender,e'},
    {name:'beforecontainercontextmenu', parameters:'sender,e'},
    {name:'beforecontainerdblclick', parameters:'sender,e'},
    {name:'beforecontainerkeydown', parameters:'sender,e'},
    {name:'beforecontainerkeypress', parameters:'sender,e'},
    {name:'beforecontainerkeyup', parameters:'sender,e'},
    {name:'beforecontainermousedown', parameters:'sender,e'},
    {name:'beforecontainermouseout', parameters:'sender,e'},
    {name:'beforecontainermouseover', parameters:'sender,e'},
    {name:'beforecontainermouseup', parameters:'sender,e'},
    {name:'beforedeactivate', parameters:'sender'},
    {name:'beforedeselect', parameters:'sender,record,index'},
    {name:'beforedestroy', parameters:'sender'},
    {name:'beforeexpand', parameters:'p,animate'},
    {name:'beforehide', parameters:'sender'},
    {name:'beforeitemclick', parameters:'sender,record,item,index,e'},
    {name:'beforeitemcontextmenu', parameters:'sender,record,item,index,e'},
    {name:'beforeitemdblclick', parameters:'sender,record,item,index,e'},
    {name:'beforeitemkeydown', parameters:'sender,record,item,index,e'},
    {name:'beforeitemkeypress', parameters:'sender,record,item,index,e'},
    {name:'beforeitemkeyup', parameters:'sender,record,item,index,e'},
    {name:'beforeitemlongpress', parameters:'sender,record,item,index,e'},
    {name:'beforeitemmousedown', parameters:'sender,record,item,index,e'},
    {name:'beforeitemmouseenter', parameters:'sender,record,item,index,e'},
    {name:'beforeitemmouseleave', parameters:'sender,record,item,index,e'},
    {name:'beforeitemmouseup', parameters:'sender,record,item,index,e'},
    {name:'beforeload', parameters:'store,operation'},
    {name:'beforereconfigure', parameters:'sender,store,columns,oldStore,oldColumns'},
    {name:'beforeremove', parameters:'sender,component'},
    {name:'beforerender', parameters:'sender'},
    {name:'beforerowbodyclick', parameters:'view,rowBodyEl,e'},
    {name:'beforerowbodycontextmenu', parameters:'view,rowBodyEl,e'},
    {name:'beforerowbodydblclick', parameters:'view,rowBodyEl,e'},
    {name:'beforerowbodykeydown', parameters:'view,rowBodyEl,e'},
    {name:'beforerowbodykeypress', parameters:'view,rowBodyEl,e'},
    {name:'beforerowbodykeyup', parameters:'view,rowBodyEl,e'},
    {name:'beforerowbodylongpress', parameters:'view,rowBodyEl,e'},
    {name:'beforerowbodymousedown', parameters:'view,rowBodyEl,e'},
    {name:'beforerowbodymouseup', parameters:'view,rowBodyEl,e'},
    {name:'beforerowexit', parameters:'sender,keyEvent,prevRow,nextRow,forward'},
    {name:'beforeselect', parameters:'sender,record,index'},
    {name:'beforeselectionextend', parameters:'grid,An,extension'},
    {name:'beforeshow', parameters:'sender'},
    {name:'beforestaterestore', parameters:'sender,state'},
    {name:'beforestatesave', parameters:'sender,state'},
    {name:'blur', parameters:'sender,event'},
    {name:'boxready', parameters:'sender,width,height'},
    {name:'cellclick', parameters:'sender,td,cellIndex,record,tr,rowIndex,e'},
    {name:'cellcontextmenu', parameters:'sender,td,cellIndex,record,tr,rowIndex,e'},
    {name:'celldblclick', parameters:'sender,td,cellIndex,record,tr,rowIndex,e'},
    {name:'cellkeydown', parameters:'sender,td,cellIndex,record,tr,rowIndex,e'},
    {name:'cellmousedown', parameters:'sender,td,cellIndex,record,tr,rowIndex,e'},
    {name:'cellmouseup', parameters:'sender,td,cellIndex,record,tr,rowIndex,e'},
    {name:'childmove', parameters:'sender,component,prevIndex,newIndex'},
    {name:'close', parameters:'panel'},
    {name:'collapse', parameters:'p'},
    {name:'columnhide', parameters:'ct,column'},
    {name:'columnmove', parameters:'ct,column,fromIdx,toIdx'},
    {name:'columnresize', parameters:'ct,column,width'},
    {name:'columnschanged', parameters:'ct'},
    {name:'columnshow', parameters:'ct,column'},
    {name:'containerclick', parameters:'sender,e'},
    {name:'containercontextmenu', parameters:'sender,e'},
    {name:'containerdblclick', parameters:'sender,e'},
    {name:'containerkeydown', parameters:'sender,e'},
    {name:'containerkeypress', parameters:'sender,e'},
    {name:'containerkeyup', parameters:'sender,e'},
    {name:'containermousedown', parameters:'sender,e'},
    {name:'containermouseout', parameters:'sender,e'},
    {name:'containermouseover', parameters:'sender,e'},
    {name:'containermouseup', parameters:'sender,e'},
    {name:'deactivate', parameters:'sender'},
    {name:'deselect', parameters:'sender,record,index'},
    {name:'destroy', parameters:'sender'},
    {name:'disable', parameters:'sender'},
    {name:'dockedadd', parameters:'sender,component,index'},
    {name:'dockedremove', parameters:'sender,component'},
    {name:'enable', parameters:'sender'},
    {name:'expand', parameters:'p'},
    {name:'filteractivate', parameters:'sender,column'},
    {name:'filterchange', parameters:'store,filters'},
    {name:'filterdeactivate', parameters:'sender,column'},
    {name:'float', parameters:''},
    {name:'focus', parameters:'sender,event'},
    {name:'focusenter', parameters:'sender,event'},
    {name:'focusleave', parameters:'sender,event'},
    {name:'glyphchange', parameters:'sender,newGlyph,oldGlyph'},
    {name:'groupchange', parameters:'store,grouper'},
    {name:'headerclick', parameters:'ct,column,e,t'},
    {name:'headercontextmenu', parameters:'ct,column,e,t'},
    {name:'headermenucreate', parameters:'grid,menu,headerCt'},
    {name:'headertriggerclick', parameters:'ct,column,e,t'},
    {name:'hide', parameters:'sender'},
    {name:'iconalignchange', parameters:'sender,newIconAlign,oldIconAlign'},
    {name:'iconchange', parameters:'sender,newIcon,oldIcon'},
    {name:'iconclschange', parameters:'sender,newIconCls,oldIconCls'},
    {name:'itemclick', parameters:'sender,record,item,index,e'},
    {name:'itemcontextmenu', parameters:'sender,record,item,index,e'},
    {name:'itemdblclick', parameters:'sender,record,item,index,e'},
    {name:'itemkeydown', parameters:'sender,record,item,index,e'},
    {name:'itemkeypress', parameters:'sender,record,item,index,e'},
    {name:'itemkeyup', parameters:'sender,record,item,index,e'},
    {name:'itemlongpress', parameters:'sender,record,item,index,e'},
    {name:'itemmousedown', parameters:'sender,record,item,index,e'},
    {name:'itemmouseenter', parameters:'sender,record,item,index,e'},
    {name:'itemmouseleave', parameters:'sender,record,item,index,e'},
    {name:'itemmouseup', parameters:'sender,record,item,index,e'},
    {name:'load', parameters:'sender,records,successful,operation'},
    {name:'lockcolumn', parameters:'sender,column'},
    {name:'move', parameters:'sender,x,y'},
    {name:'pivotbeforereconfigure', parameters:'matrix,config'},
    {name:'pivotbeforerequest', parameters:'matrix,params'},
    {name:'pivotbuildtotals', parameters:'matrix,totals'},
    {name:'pivotcolumnsbuilt', parameters:'matrix,columns'},
    {name:'pivotdone', parameters:'matrix'},
    {name:'pivotgroupcellclick', parameters:'params,e'},
    {name:'pivotgroupcellcontextmenu', parameters:'params,e'},
    {name:'pivotgroupcelldblclick', parameters:'params,e'},
    {name:'pivotgroupclick', parameters:'params,e'},
    {name:'pivotgroupcollapse', parameters:'matrix,type,group'},
    {name:'pivotgroupcontextmenu', parameters:'params,e'},
    {name:'pivotgroupdblclick', parameters:'params,e'},
    {name:'pivotgroupexpand', parameters:'matrix,type,group'},
    {name:'pivotitemcellclick', parameters:'params,e'},
    {name:'pivotitemcellcontextmenu', parameters:'params,e'},
    {name:'pivotitemcelldblclick', parameters:'params,e'},
    {name:'pivotitemclick', parameters:'params,e'},
    {name:'pivotitemcontextmenu', parameters:'params,e'},
    {name:'pivotitemdblclick', parameters:'params,e'},
    {name:'pivotmodelbuilt', parameters:'matrix,model'},
    {name:'pivotprogress', parameters:'matrix,index,total'},
    {name:'pivotreconfigure', parameters:'matrix,config'},
    {name:'pivotrecordbuilt', parameters:'matrix,record'},
    {name:'pivotrequestexception', parameters:'matrix,response'},
    {name:'pivotstart', parameters:'matrix'},
    {name:'pivotstorebuilt', parameters:'matrix,store'},
    {name:'pivottotalcellclick', parameters:'params,e'},
    {name:'pivottotalcellcontextmenu', parameters:'params,e'},
    {name:'pivottotalcelldblclick', parameters:'params,e'},
    {name:'pivottotalclick', parameters:'params,e'},
    {name:'pivottotalcontextmenu', parameters:'params,e'},
    {name:'pivottotaldblclick', parameters:'params,e'},
    {name:'processcolumns', parameters:'lockedColumns,normalColumns'},
    {name:'reconfigure', parameters:'sender,store,columns,oldStore,oldColumns'},
    {name:'remove', parameters:'sender,component'},
    {name:'removed', parameters:'sender,ownerCt'},
    {name:'render', parameters:'sender'},
    {name:'resize', parameters:'sender,width,height,oldWidth,oldHeight'},
    {name:'rowbodyclick', parameters:'view,rowBodyEl,e'},
    {name:'rowbodycontextmenu', parameters:'view,rowBodyEl,e'},
    {name:'rowbodydblclick', parameters:'view,rowBodyEl,e'},
    {name:'rowbodykeydown', parameters:'view,rowBodyEl,e'},
    {name:'rowbodykeypress', parameters:'view,rowBodyEl,e'},
    {name:'rowbodykeyup', parameters:'view,rowBodyEl,e'},
    {name:'rowbodylongpress', parameters:'view,rowBodyEl,e'},
    {name:'rowbodymousedown', parameters:'view,rowBodyEl,e'},
    {name:'rowbodymouseup', parameters:'view,rowBodyEl,e'},
    {name:'rowclick', parameters:'sender,record,element,rowIndex,e'},
    {name:'rowcontextmenu', parameters:'sender,record,tr,rowIndex,e'},
    {name:'rowdblclick', parameters:'sender,record,element,rowIndex,e'},
    {name:'rowkeydown', parameters:'sender,record,element,rowIndex,e'},
    {name:'rowmousedown', parameters:'sender,record,tr,rowIndex,e'},
    {name:'rowmouseup', parameters:'sender,record,element,rowIndex,e'},
    {name:'select', parameters:'sender,record,index'},
    {name:'selectionchange', parameters:'sender,selected'},
    {name:'selectionextenderdrag', parameters:'grid,An,extension'},
    {name:'show', parameters:'sender'},
    {name:'sortchange', parameters:'ct,column,direction'},
    {name:'staterestore', parameters:'sender,state'},
    {name:'statesave', parameters:'sender,state'},
    {name:'titlealignchange', parameters:'sender,newTitleAlign,oldTitleAlign'},
    {name:'titlechange', parameters:'sender,newTitle,oldTitle'},
    {name:'titlepositionchange', parameters:'sender,newTitlePosition,oldTitlePosition'},
    {name:'titlerotationchange', parameters:'sender,newTitleRotation,oldTitleRotation'},
    {name:'unfloat', parameters:''},
    {name:'unlockcolumn', parameters:'sender,column'},
    {name:'viewready', parameters:'sender'},
    {name:'ready', parameters:'cmd,cmdAll'}
  ]};
  static getProperties(properties) {
    properties = properties.concat(Ext_pivot_Grid.PROPERTIES());
    return Ext_grid_Panel.getProperties(properties);
  }
  static getEvents(events) {
    events = events.concat(Ext_pivot_Grid.EVENTS());
    return Ext_grid_Panel.getEvents(events);
  }

  static get observedAttributes() {
    var attrs = super.observedAttributes
    Ext_pivot_Grid.PROPERTIES().forEach(function (property, index, array) {
        attrs.push(property)
    })
    Ext_pivot_Grid.EVENTS().forEach(function (eventparameter, index, array) {
        attrs.push('on' + eventparameter.name)
    })
    return attrs
  }

  constructor(properties, events) {
    super (
      properties.concat(Ext_pivot_Grid.PROPERTIES()),
      events.concat(Ext_pivot_Grid.EVENTS())
    )
  }

  connectedCallback() {
    super.connectedCallback()
  }

  attributeChangedCallback(attrName, oldVal, newVal) {
    super.attributeChangedCallback(attrName, oldVal, newVal)
  }

}
