<!--/*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/-->
<svg id='node{{level}}{{item}}{{subplan}}{{planName}}' xmlns="http://www.w3.org/2000/svg" xml:lang="en" xmlns:xlink="http://www.w3.org/1999/xlink"
    width="200px" height="160px" class="plan-node" (click)="seeDetails(viewParams_)">
    <title>{{details}}</title>
    <style>
        @keyframes cycle {
        33.3% {
            visibility: visible;
        }
        100% {
            visibility: hidden
        }
        }

        .lit {
        animation: cycle 9s step-start infinite;
        }

        .red .lit {
        animation-delay: -3s;
        }

        .yellow .lit {
        animation-delay: -6s;
        }

        .green .lit {
        animation-delay: 0;
        }

        .operation-text {
        font-size: 12px;
        fill: black;
        }

        .operation-see-more {
        font-size: 12px;
        fill: black;
        cursor: pointer;
        }

        .card {
        cursor: pointer;
        }

        .card:hover {
        stroke: blue;
        }

        .operation-details {
        visibility: none;
        transition: opacity 1s ease-in-out;
        opacity: 0;
        }

    </style>
    <text class="operation-text" x="50%" y="50%" text-anchor="middle">{{getNodeOperatorId()}} : {{getNodeName()}}</text>
</svg>

<div class="branch" *ngIf="node.inputs">
    <li *ngIf="checkSubPlan()" class="li sub">
        <plan-node-svg class="sub" [planName]="planName" [node]="node.inputs[item].subplan[0]" [level]="0" [item]="0" [subplan]="level+item+subplan+1"></plan-node-svg>
    </li>
    <li class="li" *ngFor="let subNode of node.inputs; let i = index">
        <plan-node-svg class="" [planName]="planName" [node]="subNode" [level]="level+1" [item]="i" [subplan]="subplan" [viewParams]="viewParams"></plan-node-svg>
    </li>
</div>
