<span ng-if="::object !== undefined && object !== null">
<rekall-context-menu object='::object'>
  <!-- If the object has a details attribute, we always show it instead of our
  rendering. This is equivalent to the repr() of the object.
    -->
  <span ng-if="::object.details !== undefined">
    <samp>{{::object.details}}</samp>
  </span>
  <span ng-if="::object.details === undefined">
    <span ng-switch="::template">
      <span ng-switch-when="LiteralAddress">
        <addrpad object="::object" />
      </span>

      <span ng-switch-when="Address">
        <addrpad object="::object.value" />
      </span>

      <span ng-switch-when="Identity">
        <span>{{::object.name}}</span>
        (<span>{{::object.kind}}</span>)
      </span>

      <span ng-switch-when="datetime">
        <samp>{{::object.epoch * 1000 | date:'medium'}}</samp>
      </span>

      <span ng-switch-when="Pointer">
        <addrpad object="::object.target" pad="14" />
      </span>

      <span ng-switch-when="PaddedAddress">
        <addrpad object="::object.value" pad="14" />
      </span>

      <span ng-switch-when="AddressSpace">
        <samp>{{::object.name}}</samp>
      </span>

      <span ng-switch-when="Enumeration">
        <samp class="enum">{{::object.enum}}</samp> (<samp>{{::object.value}}</samp>)
      </span>

      <span ng-switch-when="Literal">
        <samp>{{::object.value}}
      </span>

      <span ng-switch-when="NativeType">
        <samp>{{::object.value}}</samp>
      </span>

      <span ng-switch-when="NoneObject">
        <samp tooltip="{{::object.reason}}" class="NoneObject">-</samp>
      </span>

      <span ng-switch-when="None">
        <samp class="NoneObject">-</samp>
      </span>

      <span ng-switch-when="BaseObject">
        <samp>{{::object.type_name}} @<addrpad object="::object.offset" />
      </span>

      <span ng-switch-when="Instruction">
        <rekall-instruction object="::object" />
      </span>

      <span ng-switch-when="Struct">
        <addrpad object="::object.offset" />
      </span>

      <span ng-switch-when="UnixTimeStamp">
        <samp>{{::object.epoch * 1000 | date:'medium'}}</samp>
      </span>

      <span ng-switch-when="_EPROCESS">
        <samp class="process">
          <span>{{::object.Cybox.Name}}</span> (<span>{{::object.Cybox.PID}}</span>)
        </samp>
      </span>

      <span ng-switch-when="VirtualMachine">
        <samp class="process">
          VM [<span>{{::object.num_cores}}</span> vCORE(s), <span>{{::object.guest_arch}}</span>]
        </samp>
      </span>

      <span ng-switch-when="AttributedString">
        <!-- TODO: Render highlighting properly. -->
        <samp class="pre">{{::object.value}}</samp>
      </span>

      <span ng-switch-when="HexDumpedString">
        <samp class="pre">{{::object.value}}</samp>
        <samp class="pre">{{::object.translated}}</samp>
      </span>

      <span ng-switch-when="bool">
        <span class="glyphicon"
              ng-class="::{'glyphicon-ok': object, 'glyphicon-remove': !object}"/>
      </span>

      <span ng-switch-when="str">
        <samp>{{::object.str}}</samp>
      </span>

      <span ng-switch-when="Session">
        <samp>{{::object.state.session_name[0]}}</samp>
      </span>

      <span ng-switch-default>
        <samp class="pre">{{::object}}</samp>
      </span>
    </span>
  </span>

</rekall-context-menu>
</span>
