# 3rd Party Libraries1immutable = require('immutable')23# Internal Libraries4misc = require('smc-util/misc')5{types} = misc67exports.get_store_def = (name) ->8name: name910stateTypes:11height : types.number # 0 means not rendered; otherwise is the height of the chat editor12input : types.string # content of the input box13is_preview : types.bool # currently displaying preview of the main input chat14last_sent : types.string # last sent message15messages : types.immutable.Map # Map of all messages16offset : types.number # information about where on screen the chat editor is located17position : types.number # more info about where chat editor is located18saved_mesg : types.string # The message state before saving and edited message. Potentially broken with mutiple edits19use_saved_position : types.bool # whether or not to maintain last saved scroll position (used when unmounting then remounting, e.g., due to tab change)20saved_position : types.number2122getInitialState: =>23height : 024input : ''25is_preview : undefined26last_sent : undefined27messages : undefined28offset : undefined29position : undefined30saved_mesg : undefined31use_saved_position : undefined32saved_position : undefined33343536