<div class="container">
    <h4 mat-dialog-title class="row shadowed mb-3">
        <i class="fas fa-scroll mr-2"></i>
        <span>Execute MANO primitives</span>
    </h4>

    <form [formGroup]="primitivesParamsForm">
        <mat-dialog-content>
            <div class="row">
                <div class="col-12">
                    <h6>Primitive Type</h6>
                    <p>{{data.primitiveType}}</p>
                </div>
    
                <div class="col-12">
                    <h6>VNF Profile ID</h6>
                    <p>{{data.primitive.vnf_id}}</p>
                </div>

                <div class="col-12">
                    <h6>Primitive</h6>
                    <p>{{data.primitive.primitive.name}}</p>
                </div>
        
                <div class="col-12" *ngIf="data.primitive.primitive?.parameter?.length">
                    <div class="row">
                        <mat-form-field class="col-md-6">
                            <mat-label>Primitive Parameter Name</mat-label>
                            <mat-select formControlName="parameter">
                                <mat-option *ngFor="let parameter of data.primitive.primitive.parameter" [value]="parameter">
                                    {{parameter.name}}
                                </mat-option>
                            </mat-select>
                        </mat-form-field>
        
                        <mat-form-field class="col-md-6">
                            <mat-label>Primitive Parameter Value</mat-label>
                            <input matInput formControlName="value" [placeholder]="primitivesParamsForm.controls.parameter.value['data-type']">
                        </mat-form-field>

                    </div>
                </div>
            </div>

            


        </mat-dialog-content> 
        <div class="container-fluid">
            <div class="row justify-content-end">
                <button type="button" class="btn btn-danger m-2" (click)="closeDialog()">Cancel</button>
                <button type="submit" class="btn btn-success m-2" (click)="submitDialog()">Submit</button>
            </div>
        </div>
    </form>

</div>