 module.exports = class LocationView extends StepView
   events:
     'click a': 'advance'
+
+  # @return {String} used as the suggested search text that
+  # pre-populates the location search field
+  locationDisplay: ->
+    _.compact([
+      @user.get('location')?.city
+      @user.get('location')?.state_code
+      @user.get('location')?.country
+    ]).join ', '
 
   update: (location) ->
     @geo = new GeoFormatter(location)

StepView            = require './step.coffee'
LocationSearchView  = require '../../../../components/location_search/index.coffee'
GeoFormatter        = require 'geoformatter'


  postRender: ->
    @locationSearchView = new LocationSearchView el: @$('#personalize-location-search')
    @locationSearchView.render @locationDisplay()
    @listenTo @locationSearchView, 'location:update', @update
