 {Markdown} = require 'markdownz'
 getSubjectLocation = require '../lib/get-subject-location'
 CollectionsManagerIcon = require '../collections/manager-icon'
-workflowAllowsFlipbook = require '../lib/workflow-allows-flipbook'
-workflowAllowsSeparateFrames = require '../lib/workflow-allows-separate-frames'
 
 NOOP = Function.prototype
 


  render: ->
    rootClass = 'subject-viewer'
    if @props.workflow.configuration?.multi_image_layout then rootClass += ' subject-viewer--layout-' + @props.workflow.configuration?.multi_image_layout
    if @state.inFlipbookMode then rootClass += ' subject-viewer--flipbook'
    mainDisplay = ''
    if @state.inFlipbookMode

    frame: @props.frame ? 0
    playbackRate: 1
    frameDimensions: {}
    inFlipbookMode: @props.allowFlipbook

  willReceiveProps: (nextProps) ->
    # The default state for subjects is flipbook if allowed
    if typeof nextProps.allowFlipbook is 'boolean'
      this.setState
        inFlipbookMode: allowFlipbook

  componentDidMount: ->
    @refs.videoScrubber?.value = 0
