const app = require('../app')
const _ = require('lodash')
const { dashboardIcon, staffMemberIcon, staffingAgencyIcon, laborIcon, clientIcon, serviceIcon } = require('../assets')
app.component('appUserAreaNav', {
template: html`
Intelligence
Dashboard
{{::terminal.name}}
{{::terminal.key}} Labor
{{::terminal.key}} Services
{{::terminal.key}} Staff Members
{{::terminal.key}} Clients
All
Staff Members
Staffing Agencies
Clients
Labor Categories
Service Categories
`,
controller: function(api) {
this.api = api
api.terminals().then(terminals => {
this.terminals = _.sortBy(terminals, 'key')
.filter(({key}) => api.claims[`TERMINAL_${key}_ACCESS`])
})
}
})