(function webpackUniversalModuleDefinition(root, factory) {
	if(typeof exports === 'object' && typeof module === 'object')
		module.exports = factory(require("@o/kit/export-app"));
	else if(typeof define === 'function' && define.amd)
		define(["@o/kit/export-app"], factory);
	else if(typeof exports === 'object')
		exports["main"] = factory(require("@o/kit/export-app"));
	else
		root["main"] = factory(root["@o/kit/export-app"]);
})((typeof self !== 'undefined' ? self : this), function(__WEBPACK_EXTERNAL_MODULE__o_kit__) {
return /******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/
/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId]) {
/******/ 			return installedModules[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = true;
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/******/
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;
/******/
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ 		}
/******/ 	};
/******/
/******/ 	// define __esModule on exports
/******/ 	__webpack_require__.r = function(exports) {
/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 		}
/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
/******/ 	};
/******/
/******/ 	// create a fake namespace object
/******/ 	// mode & 1: value is a module id, require it
/******/ 	// mode & 2: merge all properties of value into the ns
/******/ 	// mode & 4: return value when already ns object
/******/ 	// mode & 8|1: behave like require
/******/ 	__webpack_require__.t = function(value, mode) {
/******/ 		if(mode & 1) value = __webpack_require__(value);
/******/ 		if(mode & 8) return value;
/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ 		var ns = Object.create(null);
/******/ 		__webpack_require__.r(ns);
/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ 		return ns;
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = function(module) {
/******/ 		var getter = module && module.__esModule ?
/******/ 			function getDefault() { return module['default']; } :
/******/ 			function getModuleExports() { return module; };
/******/ 		__webpack_require__.d(getter, 'a', getter);
/******/ 		return getter;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "/";
/******/
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = 0);
/******/ })
/************************************************************************/
/******/ ({

/***/ "../../node_modules/@babel/runtime/helpers/extends.js":
/*!**************************************************************************************!*\
  !*** /Users/nw/projects/motion/orbit/node_modules/@babel/runtime/helpers/extends.js ***!
  \**************************************************************************************/
/*! no static exports found */
/*! exports used: default */
/***/ (function(module, exports) {



/***/ }),

/***/ "../../node_modules/lodash/lodash.js":
/*!*********************************************************************!*\
  !*** /Users/nw/projects/motion/orbit/node_modules/lodash/lodash.js ***!
  \*********************************************************************/
/*! no static exports found */
/*! exports used: capitalize */
/***/ (function(module, exports) {



/***/ }),

/***/ "../../node_modules/pluralize/pluralize.js":
/*!***************************************************************************!*\
  !*** /Users/nw/projects/motion/orbit/node_modules/pluralize/pluralize.js ***!
  \***************************************************************************/
/*! no static exports found */
/*! exports used: default */
/***/ (function(module, exports) {



/***/ }),

/***/ "../../node_modules/react/index.js":
/*!*******************************************************************!*\
  !*** /Users/nw/projects/motion/orbit/node_modules/react/index.js ***!
  \*******************************************************************/
/*! no static exports found */
/*! exports used: default */
/***/ (function(module, exports) {



/***/ }),

/***/ "../../packages/ui/src/index.ts":
/*!****************************************************************!*\
  !*** /Users/nw/projects/motion/orbit/packages/ui/src/index.ts ***!
  \****************************************************************/
/*! no static exports found */
/*! exports used: Breadcrumb, Breadcrumbs, Dock, DockButton, StatusBarText, TitleRow, View, randomAdjective, randomNoun */
/***/ (function(module, exports) {



/***/ }),

/***/ "./api.node.ts":
/*!*********************!*\
  !*** ./api.node.ts ***!
  \*********************/
/*! no static exports found */
/*! exports used: API */
/***/ (function(module, exports) {



/***/ }),

/***/ "./index.tsx":
/*!*******************!*\
  !*** ./index.tsx ***!
  \*******************/
/*! exports provided: default, ListsAppIndex */
/*! all exports used */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ListsAppIndex", function() { return ListsAppIndex; });
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "../../node_modules/@babel/runtime/helpers/extends.js");
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _o_kit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @o/kit */ "@o/kit");
/* harmony import */ var _o_kit__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_o_kit__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _o_ui__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @o/ui */ "../../packages/ui/src/index.ts");
/* harmony import */ var _o_ui__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_o_ui__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash */ "../../node_modules/lodash/lodash.js");
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var pluralize__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! pluralize */ "../../node_modules/pluralize/pluralize.js");
/* harmony import */ var pluralize__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(pluralize__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react */ "../../node_modules/react/index.js");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _api_node__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./api.node */ "./api.node.ts");
/* harmony import */ var _api_node__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_api_node__WEBPACK_IMPORTED_MODULE_6__);







/* harmony default export */ __webpack_exports__["default"] = (Object(_o_kit__WEBPACK_IMPORTED_MODULE_1__["createApp"])({
  id: 'lists',
  name: 'Lists',
  icon: 'list',
  iconColors: ['rgb(57, 204, 204)', 'rgb(61, 153, 112)'],
  api: () => _api_node__WEBPACK_IMPORTED_MODULE_6__["API"],
  app: () => react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement(_o_kit__WEBPACK_IMPORTED_MODULE_1__["AppNavigator"], {
    index: ListsAppIndex,
    detail: ListsAppMain
  })
}));
const id = 'lists';
function ListsAppIndex(props) {
  const treeList = Object(_o_kit__WEBPACK_IMPORTED_MODULE_1__["useTreeList"])(id);
  Object(_o_kit__WEBPACK_IMPORTED_MODULE_1__["useSearchState"])({
    onChange(search) {
      if (search.query.length) {
        treeList.actions.addFolder(search.query);
      }
    },

    onEvent: 'enter'
  });
  return react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_5___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement(_o_kit__WEBPACK_IMPORTED_MODULE_1__["TreeList"], {
    use: treeList,
    sortable: true,
    alwaysSelected: true,
    selectable: "multi",
    onSelect: props.selectItems,
    itemProps: {
      editable: true,
      deletable: true
    }
  }), react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement(ListAppStatusBar, null), react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement(_o_ui__WEBPACK_IMPORTED_MODULE_2__["Dock"], null, react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement(_o_ui__WEBPACK_IMPORTED_MODULE_2__["DockButton"], {
    id: "add",
    icon: "plus",
    onClick: () => {
      treeList.actions.addItem({
        name: Object(lodash__WEBPACK_IMPORTED_MODULE_3__["capitalize"])(Object(_o_ui__WEBPACK_IMPORTED_MODULE_2__["randomAdjective"])()) + " " + Object(lodash__WEBPACK_IMPORTED_MODULE_3__["capitalize"])(Object(_o_ui__WEBPACK_IMPORTED_MODULE_2__["randomNoun"])())
      });
    }
  })));
}
ListsAppIndex.displayName = "ListsAppIndex";

function ListsAppMain(props) {
  if (props.subType === 'folder') {
    return react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement(ListsAppMainFolder, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({
      key: props.subId
    }, props));
  }

  return react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_5___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement(_o_ui__WEBPACK_IMPORTED_MODULE_2__["TitleRow"], {
    padding: true,
    bordered: true,
    margin: 0,
    title: props.title
  }), react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement(_o_kit__WEBPACK_IMPORTED_MODULE_1__["AppContentView"], props));
}

ListsAppMain.displayName = "ListsAppMain";

function ListsAppMainFolder(props) {
  const treeList = Object(_o_kit__WEBPACK_IMPORTED_MODULE_1__["useTreeList"])(id, {
    rootItemID: props.subId ? +props.subId : 0,
    persist: 'tree'
  });
  return react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement(_o_kit__WEBPACK_IMPORTED_MODULE_1__["TreeList"], {
    use: treeList,
    title: props.title,
    items: treeList.state.items,
    droppable: true,
    sortable: true,
    onDrop: items => {
      console.log('dropped an item', items);
      treeList.actions.addItemsFromDrop(items);
    },
    onChange: items => {
      console.log('got an update, persist back to main list', items);
    }
  });
}

ListsAppMainFolder.displayName = "ListsAppMainFolder";

function ListAppStatusBar() {
  const treeList = Object(_o_kit__WEBPACK_IMPORTED_MODULE_1__["useTreeList"])(id);
  const numItems = treeList.state.currentItem.children ? treeList.state.currentItem.children.length : 0;
  return react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement(_o_kit__WEBPACK_IMPORTED_MODULE_1__["AppStatusBar"], null, react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement(_o_ui__WEBPACK_IMPORTED_MODULE_2__["Breadcrumbs"], null, treeList.state.history.map(item => react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement(_o_ui__WEBPACK_IMPORTED_MODULE_2__["Breadcrumb"], {
    size: 0.9,
    alpha: 0.68,
    fontWeight: 500,
    key: item.id
  }, item.name))), react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement(_o_ui__WEBPACK_IMPORTED_MODULE_2__["View"], {
    flex: 1
  }), react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement(_o_ui__WEBPACK_IMPORTED_MODULE_2__["StatusBarText"], null, numItems, " ", pluralize__WEBPACK_IMPORTED_MODULE_4___default()('item', numItems)));
}

ListAppStatusBar.displayName = "ListAppStatusBar";

/***/ }),

/***/ 0:
/*!*************************!*\
  !*** multi ./index.tsx ***!
  \*************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(/*! /Users/nw/projects/motion/orbit/apps/lists-app/index.tsx */"./index.tsx");


/***/ }),

/***/ "@o/kit":
/*!************************************!*\
  !*** external "@o/kit/export-app" ***!
  \************************************/
/*! no static exports found */
/*! exports used: AppContentView, AppNavigator, AppStatusBar, TreeList, createApp, useSearchState, useTreeList */
/***/ (function(module, exports) {

module.exports = __WEBPACK_EXTERNAL_MODULE__o_kit__;

/***/ })

/******/ });
});
//# sourceMappingURL=appInfo.js.map