{"ast":null,"code":"import _regeneratorRuntime from \"/home/jjglover/goallinestats/node_modules/@babel/runtime/regenerator\";\nimport _classCallCheck from \"/home/jjglover/goallinestats/node_modules/@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"/home/jjglover/goallinestats/node_modules/@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"/home/jjglover/goallinestats/node_modules/@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"/home/jjglover/goallinestats/node_modules/@babel/runtime/helpers/esm/inherits\";\nimport _possibleConstructorReturn from \"/home/jjglover/goallinestats/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn\";\nimport _getPrototypeOf from \"/home/jjglover/goallinestats/node_modules/@babel/runtime/helpers/esm/getPrototypeOf\";\nimport _asyncToGenerator from \"/home/jjglover/goallinestats/node_modules/@babel/runtime/helpers/esm/asyncToGenerator\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nimport axios from 'axios';\nimport React from 'react';\nimport MakeTable from '../components/table.js';\nimport BuildFilterList from '../components/filter.js';\n\nfunction fetchStats(_x) {\n  return _fetchStats.apply(this, arguments);\n}\n\nfunction _fetchStats() {\n  _fetchStats = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(parameters) {\n    var arrayData, DataTableContent;\n    return _regeneratorRuntime.wrap(function _callee2$(_context2) {\n      while (1) {\n        switch (_context2.prev = _context2.next) {\n          case 0:\n            console.log(parameters);\n            _context2.next = 3;\n            return axios.get(parameters);\n\n          case 3:\n            arrayData = _context2.sent;\n            DataTableContent = arrayData.data;\n            return _context2.abrupt(\"return\", DataTableContent);\n\n          case 6:\n          case \"end\":\n            return _context2.stop();\n        }\n      }\n    }, _callee2);\n  }));\n  return _fetchStats.apply(this, arguments);\n}\n\nfunction convertMonth(month) {\n  var monthArray = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];\n  return monthArray[month];\n}\n\nfunction convertDay(day) {\n  var dayArray = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];\n  return dayArray[day];\n}\n\nfunction convertShortDay(day) {\n  var dayArray = ['Sun', 'Mon', 'Tues', 'Wed', 'Thurs', 'Fri', 'Sat'];\n  return dayArray[day];\n}\n\nfunction convertOrdinal(n) {\n  var addition = [\"st\", \"nd\", \"rd\"][((n + 90) % 100 - 10) % 10 - 1] || \"th\";\n  return n + addition;\n}\n\nvar datePicker = /*#__PURE__*/function (_React$Component) {\n  _inherits(datePicker, _React$Component);\n\n  var _super = _createSuper(datePicker);\n\n  function datePicker(props) {\n    var _this;\n\n    _classCallCheck(this, datePicker);\n\n    _this = _super.call(this, props);\n    _this.clickLink = _this.clickLink.bind(_assertThisInitialized(_this));\n    _this.handleDateChange = _this.handleDateChange.bind(_assertThisInitialized(_this));\n    _this.state = {\n      inputDate: ''\n    };\n    return _this;\n  }\n\n  _createClass(datePicker, [{\n    key: \"handleDateChange\",\n    value: function handleDateChange(event) {\n      var _this2 = this;\n\n      this.setState({\n        inputDate: event.target.value\n      }, function () {\n        return _this2.clickLink();\n      });\n    }\n  }, {\n    key: \"clickLink\",\n    value: function clickLink() {\n      //(event) => {this.setState({inputDate: event.target.value})}\n      this.props.updateTable(this.props.buttongroup, this.state.inputDate);\n    }\n  }, {\n    key: \"render\",\n    value: function render() {\n      return /*#__PURE__*/_jsxs(\"div\", {\n        className: \"filterMenu d-inline-block\",\n        children: [/*#__PURE__*/_jsx(\"span\", {\n          className: \"pr-2 font-weight-bold\",\n          children: \"Date Selector: \"\n        }), /*#__PURE__*/_jsx(\"input\", {\n          onChange: this.handleDateChange,\n          id: this.props.id,\n          type: \"date\",\n          value: this.state.inputDate\n        })]\n      });\n    }\n  }]);\n\n  return datePicker;\n}(React.Component);\n\nfunction BuildGridFilter(props) {\n  var dataarray = props.dataset.dataTable; //console.log(dataarray)\n\n  var viewFilterRow = /*#__PURE__*/React.createElement(BuildFilterList, {\n    title: 'Type',\n    buttons: [{\n      value: 'Grid',\n      text: 'Grid'\n    }, {\n      value: 'List',\n      text: 'List'\n    }],\n    buttonGroup: 'type',\n    updateTable: props.updateTable\n  });\n  var groupFilterRow = /*#__PURE__*/React.createElement(BuildFilterList, {\n    title: 'Priority',\n    buttons: [{\n      value: 'Level',\n      text: 'Level'\n    }, {\n      value: 'Location',\n      text: 'Location'\n    }],\n    buttonGroup: 'priority',\n    updateTable: props.updateTable\n  });\n\n  if (dataarray['subseasonFilter'].length > 1) {\n    var subseasonFilterRow = /*#__PURE__*/React.createElement(BuildFilterList, {\n      title: 'Playoffs',\n      buttons: dataarray['subseasonFilter'],\n      buttonGroup: 'subseasonid',\n      updateTable: props.updateTable\n    });\n  } else {\n    var subseasonFilterRow = '';\n  }\n\n  var dateFilterRow = /*#__PURE__*/React.createElement(datePicker, {\n    id: 'schedDatePicker',\n    buttongroup: 'date',\n    updateTable: props.updateTable\n  });\n\n  if (dataarray['dateFilter'] == 1) {\n    var dateFilterButtons = /*#__PURE__*/React.createElement(BuildFilterList, {\n      title: 'Date',\n      buttons: [{\n        value: 'Today',\n        text: 'Today'\n      }, {\n        value: 'Yesterday',\n        text: 'Yesterday'\n      }],\n      buttonGroup: 'date',\n      updateTable: props.updateTable\n    });\n  } else {\n    var dateFilterButtons = '';\n  }\n\n  var optionBars = [];\n\n  if (viewFilterRow) {\n    optionBars.push(viewFilterRow);\n  }\n\n  ;\n\n  if (groupFilterRow) {\n    optionBars.push(groupFilterRow);\n  }\n\n  ;\n\n  if (dateFilterButtons) {\n    optionBars.push(dateFilterButtons);\n  }\n\n  ;\n\n  if (dateFilterRow) {\n    optionBars.push(dateFilterRow);\n  }\n\n  ;\n\n  if (subseasonFilterRow) {\n    optionBars.push(subseasonFilterRow);\n  }\n\n  ;\n  return /*#__PURE__*/_jsx(\"div\", {\n    children: optionBars\n  });\n}\n\nfunction BuildListFilter(props) {\n  var optionBars = [];\n  var dataarray = props.dataset.dataTable;\n  console.log(props.dataset.baseURL.search('teamid'));\n\n  if (props.dataset.baseURL.search('teamid') == -1) {\n    var viewFilterRow = /*#__PURE__*/React.createElement(BuildFilterList, {\n      title: 'Type',\n      buttons: [{\n        value: 'Grid',\n        text: 'Grid'\n      }, {\n        value: 'List',\n        text: 'List'\n      }],\n      buttonGroup: 'type',\n      updateTable: props.updateTable\n    });\n  } else {\n    var viewFilterRow = '';\n  }\n\n  if (dataarray['subseasonFilter'].length > 1) {\n    var subseasonFilterRow = /*#__PURE__*/React.createElement(BuildFilterList, {\n      title: 'Playoffs',\n      buttons: dataarray['subseasonFilter'],\n      buttonGroup: 'subseasonid',\n      updateTable: props.updateTable\n    });\n  } else {\n    var subseasonFilterRow = '';\n  }\n\n  var dateFilterRow = /*#__PURE__*/React.createElement(datePicker, {\n    id: 'schedDatePicker',\n    buttongroup: 'date',\n    onClick: props.updateTable\n  });\n\n  if (dataarray['filterMenu']) {\n    var groupFilterRow = /*#__PURE__*/React.createElement(BuildFilterList, {\n      title: 'List of Games',\n      buttons: dataarray['filterMenu'],\n      buttonGroup: 'filter',\n      updateTable: props.updateTable\n    });\n  }\n\n  if (dataarray['maxPage'] > 1) {\n    pagesDisplayBelow = 2;\n    buttonList = [{\n      'value': '1',\n      'text': 'First'\n    }];\n\n    for (var pageLink = dataarray['currentPage'] - pagesDisplayBelow; pageLink <= dataarray['currentPage'] + pagesDisplayBelow; pageLink++) {\n      if (pageLink > 0 && pageLink <= dataarray['maxPage']) {\n        buttonList.push([pageLink]);\n      }\n    }\n\n    buttonList.push({\n      'value': dataarray['maxPage'],\n      'text': 'Last'\n    });\n    var schedPageRow = /*#__PURE__*/React.createElement(BuildFilterList, {\n      title: 'Select Page',\n      buttons: buttonList,\n      buttonGroup: 'page',\n      updateTable: props.updateTable\n    });\n  } else {\n    var schedPageRow = '';\n  }\n\n  if (viewFilterRow) {\n    optionBars.push(viewFilterRow);\n  }\n\n  ;\n\n  if (groupFilterRow) {\n    optionBars.push(groupFilterRow);\n  }\n\n  ;\n\n  if (subseasonFilterRow) {\n    optionBars.push(subseasonFilterRow);\n  }\n\n  ;\n\n  if (schedPageRow) {\n    optionBars.push(schedPageRow);\n  }\n\n  ;\n  return /*#__PURE__*/_jsx(\"div\", {\n    children: optionBars\n  });\n}\n\nfunction refreshSched(groupPriority, schedDataGames) {\n  var date = schedDataGames[0]['GameDate'] + ' ' + schedDataGames[0]['GameStartTime'];\n\n  if (groupPriority == 'Level') {\n    var group = schedDataGames[0]['Level'];\n    var group2 = schedDataGames[0]['Division'];\n  } else if (groupPriority == 'Location') {\n    var group = schedDataGames[0]['LocationName'];\n    var group2 = schedDataGames[0]['Rink'];\n  }\n\n  if (group2) {\n    var headerdisplay = group + ' ' + group2;\n  } else {\n    var headerdisplay = group;\n  }\n\n  var GridData = [];\n  var cardGroup = [];\n  var divGroup = [];\n\n  for (var card = 0; card < schedDataGames.length; card++) {\n    if (groupPriority == 'Level') {\n      var compare = schedDataGames[card]['Level'];\n      var compare2 = schedDataGames[card]['Division'];\n    } else if (groupPriority == 'Location') {\n      var compare = schedDataGames[card]['LocationName'];\n      var compare2 = schedDataGames[card]['Rink'];\n    }\n\n    if (group2) {\n      var headerdisplay = group + ' ' + group2;\n    } else {\n      var headerdisplay = group;\n    }\n\n    if (date != schedDataGames[card]['GameDate'] + ' ' + schedDataGames[0]['GameStartTime']) {\n      divGroup.push( /*#__PURE__*/React.createElement('div', {\n        className: 'grouplevel'\n      }, /*#__PURE__*/React.createElement('h3', null, headerdisplay), cardGroup));\n      var newGameDate = new Date(date);\n      var gameDay = convertDay(newGameDate.getDay());\n      var gameMonth = convertMonth(newGameDate.getMonth());\n      var gameDate = convertOrdinal(newGameDate.getDate());\n      GridData.push( /*#__PURE__*/_jsxs(\"div\", {\n        className: \"schedLevel\",\n        children: [/*#__PURE__*/_jsx(\"h2\", {\n          children: gameDay + \", \" + gameMonth + \" \" + gameDate\n        }), divGroup]\n      }));\n      divGroup = [];\n      cardGroup = [];\n      date = schedDataGames[card]['GameDate'] + ' ' + schedDataGames[0]['GameStartTime'];\n      group = compare;\n      group2 = compare2;\n    }\n\n    if (group != compare || group2 != compare2) {\n      if (group2) {\n        headerdisplay = group + ' ' + group2;\n      } else {\n        headerdisplay = group;\n      }\n\n      divGroup.push( /*#__PURE__*/_jsxs(\"div\", {\n        className: \"grouplevel\",\n        children: [/*#__PURE__*/_jsx(\"h3\", {\n          children: headerdisplay\n        }), cardGroup]\n      }));\n      cardGroup = [];\n      group = compare;\n      group2 = compare2;\n\n      if (group2) {\n        headerdisplay = group + ' ' + group2;\n      } else {\n        headerdisplay = group;\n      }\n    }\n\n    cardGroup.push( /*#__PURE__*/_jsx(\"schedCard\", {\n      cardData: schedDataGames[card]\n    }, schedDataGames[card]['idGame']));\n  }\n\n  if (cardGroup.length > 0 || divGroup.length > 0) {\n    var newGameDate = new Date(date); //console.log(convertDay(0))\n\n    var gameDay = convertDay(newGameDate.getDay());\n    var gameMonth = convertMonth(newGameDate.getMonth());\n    var gameDate = convertOrdinal(newGameDate.getDate());\n    divGroup.push( /*#__PURE__*/_jsxs(\"div\", {\n      className: \"grouplevel\",\n      children: [/*#__PURE__*/_jsx(\"h3\", {\n        children: headerdisplay\n      }), cardGroup]\n    }));\n    GridData.push( /*#__PURE__*/_jsxs(\"div\", {\n      children: [/*#__PURE__*/_jsx(\"h2\", {\n        children: gameDay + \", \" + gameMonth + \" \" + gameDate\n      }), divGroup]\n    }));\n  }\n\n  return GridData;\n}\n\nvar schedCard = /*#__PURE__*/function (_React$Component2) {\n  _inherits(schedCard, _React$Component2);\n\n  var _super2 = _createSuper(schedCard);\n\n  function schedCard(props) {\n    _classCallCheck(this, schedCard);\n\n    return _super2.call(this, props);\n  }\n\n  _createClass(schedCard, [{\n    key: \"render\",\n    value: function render() {\n      function createTeamtd(teamID, teamPrefix, teamName, teamImage) {\n        if (teamPrefix) {\n          var teamName = teamPrefix + ' ' + teamName;\n        } else {\n          var teamName = teamName;\n        }\n\n        return /*#__PURE__*/_jsxs(\"a\", {\n          href: \"index.html?teamid=\" + teamID,\n          children: [/*#__PURE__*/_jsx(\"img\", {\n            src: teamImage,\n            className: \"table-img\"\n          }), teamName]\n        });\n      }\n\n      function dataLine(element, array) {\n        var outputarray = [];\n        array.map(function (arrayitem) {\n          return outputarray.push( /*#__PURE__*/React.createElement(element, null, arrayitem));\n        });\n        return outputarray;\n      }\n\n      var gameTime = this.props.cardData.GameStartTime.split(\":\");\n      var ampm = 'AM';\n\n      if (gameTime[0] > 12) {\n        gameTime[0] = gameTime[0] - 12;\n        var ampm = 'PM';\n      }\n\n      var displayGameTime = gameTime[0] + ':' + gameTime[1] + ' ' + ampm;\n      var HomeTeamPoint = createTeamtd(this.props.cardData.HomeTeam, this.props.cardData.HomePrefix, this.props.cardData.HomeTeamName, this.props.cardData.HomeImage);\n      var AwayTeamPoint = createTeamtd(this.props.cardData.AwayTeam, this.props.cardData.AwayPrefix, this.props.cardData.AwayTeamName, this.props.cardData.AwayImage);\n\n      if (this.props.cardData.GameFinished == 1) {\n        var homeArray = [HomeTeamPoint, this.props.cardData.Home1stGoals, this.props.cardData.Home2ndGoals, this.props.cardData.Home3rdGoals];\n        var awayArray = [AwayTeamPoint, this.props.cardData.Away1stGoals, this.props.cardData.Away2ndGoals, this.props.cardData.Away3rdGoals];\n        var headerArray = [null, '1st', '2nd', '3rd'];\n\n        if (this.props.cardData.HomeOTShots > 0 || this.props.cardData.AwayOTShots > 0) {\n          headerArray.push('OT', 'F/OT');\n          homeArray.push(this.props.cardData.HomeOTGoals);\n          awayArray.push(this.props.cardData.AwayOTGoals);\n        } else {\n          headerArray.push('Final');\n        }\n\n        homeArray.push(this.props.cardData.HomeGoals);\n        awayArray.push(this.props.cardData.AwayGoals);\n        var homeLineClass = '';\n        var awayLineClass = '';\n\n        if (this.props.cardData.HomeGoals > this.props.cardData.AwayGoals) {\n          homeLineClass = 'font-weight-bold';\n        } else if (this.props.cardData.AwayGoals > this.props.cardData.HomeGoals) {\n          awayLineClass = 'font-weight-bold';\n        }\n\n        var footerLinkText = 'Game Recap';\n      } else if (this.props.cardData.GameFinished == 0) {\n        var homeRecord = '(' + this.props.cardData.HomeWins + '-' + this.props.cardData.HomeLoss + '-' + this.props.cardData.HomeTie + '-' + this.props.cardData.HomeOTL + ', ' + this.props.cardData.HomePts + ' pts.)';\n        var awayRecord = '(' + this.props.cardData.AwayWins + '-' + this.props.cardData.AwayLoss + '-' + this.props.cardData.AwayTie + '-' + this.props.cardData.AwayOTL + ', ' + this.props.cardData.AwayPts + ' pts.)';\n        var homeArray = [HomeTeamPoint, homeRecord, this.props.cardData.LocationName + ' ' + this.props.cardData.Rink];\n        var awayArray = [AwayTeamPoint, awayRecord, displayGameTime];\n        var headerArray = ['Upcoming Game', null, null];\n        var footerLinkText = 'Game Preview';\n      }\n\n      var headerReactArray = dataLine('th', headerArray);\n      var HomeReactArray = dataLine('td', homeArray);\n      var AwayReactArray = dataLine('td', awayArray);\n      return /*#__PURE__*/_jsxs(\"div\", {\n        className: \"gameSched\",\n        children: [/*#__PURE__*/_jsxs(\"table\", {\n          className: \"schedGrid\",\n          children: [/*#__PURE__*/_jsx(\"thead\", {\n            children: /*#__PURE__*/_jsx(\"tr\", {\n              children: headerReactArray\n            })\n          }), /*#__PURE__*/_jsxs(\"tbody\", {\n            children: [/*#__PURE__*/_jsx(\"tr\", {\n              className: homeLineClass,\n              children: HomeReactArray\n            }), /*#__PURE__*/_jsx(\"tr\", {\n              className: awayLineClass,\n              children: AwayReactArray\n            })]\n          })]\n        }), /*#__PURE__*/_jsx(\"div\", {\n          className: \"schedCardfooter\",\n          children: /*#__PURE__*/_jsx(\"a\", {\n            href: \"gamerecap.html?gameID=\" + this.props.cardData.idGame,\n            children: footerLinkText\n          })\n        })]\n      });\n    }\n  }]);\n\n  return schedCard;\n}(React.Component);\n\nvar SchedBuilder = /*#__PURE__*/function (_React$Component3) {\n  _inherits(SchedBuilder, _React$Component3);\n\n  var _super3 = _createSuper(SchedBuilder);\n\n  function SchedBuilder(props) {\n    var _this3;\n\n    _classCallCheck(this, SchedBuilder);\n\n    _this3 = _super3.call(this, props);\n    _this3.state = {\n      initialized: false,\n      options: {\n        type: \"type=\" + _this3.props.type,\n        priority: \"priority=\" + _this3.props.priority,\n        date: null,\n        subseasonid: null,\n        page: null,\n        filter: null\n      },\n      baseURL: _this3.props.baseURL,\n      currentDisplay: null,\n      currentDisplayOptions: _this3.props.optionsMenu\n    };\n    _this3.updateTable = _this3.updateTable.bind(_assertThisInitialized(_this3));\n    return _this3;\n  }\n  /*\n  constructFilter() {\n    console.log(this.state)\n    const filterBuilder = this.props.dataTable\n    filterBuilder['updateTable'] = this.updateTable\n    if (this.state.options.type == 'List') {\n      this.setState((state) => ({currentDisplayOptions: BuildListFilter(filterBuilder)}));\n    }\n    else if (this.state.options.type == 'Grid') {\n      this.setState((state) => ({currentDisplayOptions: BuildGridFilter(filterBuilder)}));\n    }\n  }\n  */\n\n\n  _createClass(SchedBuilder, [{\n    key: \"updateTable\",\n    value: function () {\n      var _updateTable = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(sortset, text) {\n        var updateText, currentState, currentOptions, index, requestURL, refreshTable, listTable, fetchGrid, getpriority, GridTable;\n        return _regeneratorRuntime.wrap(function _callee$(_context) {\n          while (1) {\n            switch (_context.prev = _context.next) {\n              case 0:\n                updateText = sortset + '=' + text;\n                currentState = this.state.options;\n\n                if (sortset == 'type') {\n                  currentState.type = updateText;\n                } else if (sortset == 'priority') {\n                  currentState.priority = updateText;\n                } else if (sortset == 'date') {\n                  currentState.date = updateText;\n                } else if (sortset == 'subseasonid') {\n                  currentState.subseasonid = updateText;\n                } else if (sortset == 'filter') {\n                  currentState.filter = updateText;\n                } else if (sortset == 'page') {\n                  currentState.page = updateText;\n                }\n\n                this.setState(function (state) {\n                  return {\n                    options: currentState\n                  };\n                });\n                console.log(this.state.options);\n                currentOptions = '';\n\n                for (index in this.state.options) {\n                  if (this.state.options[index] != null) {\n                    console.log(this.state.options[index]);\n                    currentOptions += '&' + this.state.options[index];\n                  }\n                }\n\n                requestURL = this.state.baseURL + currentOptions;\n\n                if (!(this.state.options.type == 'List')) {\n                  _context.next = 15;\n                  break;\n                }\n\n                _context.next = 11;\n                return fetchStats(requestURL);\n\n              case 11:\n                refreshTable = _context.sent;\n\n                //this.setState((state) => ({currentDisplayOptions: buildListFilter(refreshTable)}));\n                if (refreshTable['dataarray'].length > 0) {\n                  listTable = /*#__PURE__*/_jsx(MakeTable, {\n                    currentset: refreshTable\n                  });\n                  this.setState(function (state) {\n                    return {\n                      currentDisplay: listTable\n                    };\n                  });\n                } else {\n                  this.setState(function (state) {\n                    return {\n                      currentDisplay: /*#__PURE__*/_jsx(\"h5\", {\n                        children: \"No Games Found!\"\n                      })\n                    };\n                  });\n                }\n\n                _context.next = 20;\n                break;\n\n              case 15:\n                if (!(this.state.options.type == 'Grid')) {\n                  _context.next = 20;\n                  break;\n                }\n\n                _context.next = 18;\n                return fetchStats(requestURL);\n\n              case 18:\n                fetchGrid = _context.sent;\n\n                //this.setState((state) => ({currentDisplayOptions: <BuildGridFilter dataset={fetchGrid} updateTable={this.state.updateTable} />}));\n                if (fetchGrid['dataarray'].length > 0) {\n                  getpriority = this.state.options['priority'].split('=')[1];\n                  GridTable = refreshSched(getpriority, fetchGrid['dataarray']);\n                  this.setState(function (state) {\n                    return {\n                      currentDisplay: GridTable\n                    };\n                  });\n                } else {\n                  this.setState(function (state) {\n                    return {\n                      currentDisplay: /*#__PURE__*/_jsx(\"h5\", {\n                        children: \"No Games Found!\"\n                      })\n                    };\n                  });\n                }\n\n              case 20:\n              case \"end\":\n                return _context.stop();\n            }\n          }\n        }, _callee, this);\n      }));\n\n      function updateTable(_x2, _x3) {\n        return _updateTable.apply(this, arguments);\n      }\n\n      return updateTable;\n    }()\n    /*\n      componentDidMount() {\n        this.constructFilter()\n      }\n    */\n\n  }, {\n    key: \"render\",\n    value: function render() {\n      return /*#__PURE__*/_jsxs(\"div\", {\n        children: [/*#__PURE__*/_jsx(\"div\", {\n          className: \"optionsDiv\",\n          children: this.state.options.type == \"type=Grid\" ? /*#__PURE__*/_jsx(BuildGridFilter, {\n            dataset: this.state.currentDisplayOptions,\n            updateTable: this.updateTable\n          }) : /*#__PURE__*/_jsx(BuildListFilter, {\n            dataset: this.state.currentDisplayOptions,\n            updateTable: this.updateTable\n          })\n        }), /*#__PURE__*/_jsx(\"div\", {\n          id: this.props.id,\n          children: this.state.currentDisplay\n        })]\n      });\n    }\n  }], [{\n    key: \"getDerivedStateFromProps\",\n    value: function getDerivedStateFromProps(props, state) {\n      if (state.initialized == false) {\n        if (props.dataTable.dataarray.length > 0) {\n          var startSched = /*#__PURE__*/_jsx(MakeTable, {\n            currentset: props\n          });\n        } else {\n          var startSched = /*#__PURE__*/_jsx(\"h5\", {\n            children: \"No Games Found\"\n          });\n        }\n\n        return {\n          initialized: true,\n          currentDisplay: startSched,\n          currentDisplayOptions: props\n        };\n      } else {\n        return null;\n      }\n    }\n  }]);\n\n  return SchedBuilder;\n}(React.Component);\n\nexport { SchedBuilder as default };","map":null,"metadata":{},"sourceType":"module"}