<!--
Copyright 2014 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->

<link rel="import" href="ct-failure-card.html">

<polymer-element name="ct-failure-stream" attributes="groups commits tree category" noscript>
  <template>
    <style>
      :host {
        display: block;
      }

      ct-failure-card {
        margin-bottom: 5px;
        padding: 5px;
        border-top: 1px solid lightgrey;
      }
    </style>
    <!-- FIXME: Show a label based on the category when the filtered stream isn't empty -->
    <template repeat="{{ group in groups }}">
      <template if="{{ group.category == category }}">
        <ct-failure-card group="{{ group }}" commits="{{ commits }}" tree="{{ tree }}"></ct-failure-card>
      </template>
    </template>
  </template>
</polymer-element>
