#Introduction

In this lab you'll create the details container.

#Steps

??Plan your work

The detail component you're creating in this lab will show details about the selected 
business. 

Conceptually, the details view "reflects details for the specified business," 
so you'll set it up with a _business_ property, just like you did for the tab container.
Main will detect the _businessChange_ event, then pass the business to the details
view by assigning the business record to the detail view's property.

The details view will be contained within the main container, off to the right. We have a 
choice about how to lay things out: we could have main arrange its items via _hbox_ layout, 
with two items in its `items:[]` &mdash; the tab container and the details view &mdash; 
or we could make the details view another docked item, docked on the right. We'll do the latter.

Main already listens to the _businessChange_ event. You'll modify that code to have it pass the 
business to the details view you're creating in this lab.

??Create the panel

Use the `create-class` script to create a class named `Yelp.view.business.Details`
that extends `container.Base`.

Add a `ntype:'yelp-business-details',` config to the new class. We can use
that when we create an instance in the main view, and it might come in handy
when debugging.

??Create a <kbd>business_</kbd> property

Continue editing `business/Details.mjs` and create a <kbd>business_:null,</kbd> 
property, and a corresponding `afterSetBusiness(business)` method that logs 
the passed business.

??Use the class in the main view

Import the new details view, and modify the corresponding entry in the `items:[]`
to create the details view. Configure it with `reference: 'details'`.

??Update the business as the user selects items on the map

The main view controller is detecting changes to the business 
from the tabs view. Modify that code to pass the information onto the details
view. 

    onBusinessChange(business){
        this.getReference('details').business = business;
    }

Note that the code no longer needs the console log it had, so we'll 
delete it to avoid consusion with the console log in the details view.

Save and refresh, and and as you choose map markers you should
see the log emanating from the details view.

