<ol class="breadcrumb breadcrumb-arrow font-trirong">
  <li><a href="javascript://" [routerLink]="['/']">Home</a></li>
  <li><a href="javascript://">stepper</a></li>
</ol>

<div class="button-bar">

  <span class="spacer"></span>
  <button class="btn btn-sm btn-primary" (click)="reset()">Reset</button>

  <button class="btn btn-sm btn-primary" (click)="changeToHorizonTal()"
    *ngIf="layout.direction === 'vertical'">HorizonTal Layout</button>
  <button class="btn btn-sm btn-primary" (click)="changeToVertical()" *ngIf="layout.direction === 'horizontal'">Vertical
    Layout</button>

</div>

<div class="clr-row">
  <div [class]="layout.block1">
    <div class="card">
      <div class="card-header">
        <h3 style="text-align: center;"> Workflow</h3>
      </div>

      <div class=" card-block container">

        <clr-timeline [clrLayout]="layout.direction">
   <clr-timeline-step [clrState]="timelineStyle.step0.state">
            <clr-timeline-step-header>step 0</clr-timeline-step-header>
            <clr-timeline-step-title> <span *ngIf="!appToUpdate">Application</span><span *ngIf="appToUpdate"> Update
                Datagrid</span> </clr-timeline-step-title>
            <clr-timeline-step-description> <span>Create/bhj<br> Information Of
                Customer</span></clr-timeline-step-description>
          </clr-timeline-step>  

 <clr-timeline-step [clrState]="timelineStyle.step1.state">
            <clr-timeline-step-header>Step 2</clr-timeline-step-header>
            <clr-timeline-step-title>Review And <br>Confirmation</clr-timeline-step-title>
            <clr-timeline-step-description>
              Finish .
            </clr-timeline-step-description>
          </clr-timeline-step></clr-timeline>
      </div>
    </div>
  </div>
  <div [class]="layout.block2">
    <!--STEP 0-->
    <div class="card" *ngIf="timelineStyle.step0.open">
      <div class="card-header">
        <h3 style="text-align: center;" *ngIf="!appToUpdate">bhj</h3>
        <h3 style="text-align: center;" *ngIf="appToUpdate"> Update {{TestaentryForm.name}}</h3>
        <div class="container">

          <br />

        
          <form [formGroup]="TestaentryForm">

            <div class="container">

              <div class="clr-row"><div class="clr-col-sm-12">
 <label>  Name</label>
 <input class="clr-input"  type="text"  formControlName="name" />       
 </div>

<div class="clr-col-sm-12">             
 <label>  Description</label>             
 <textarea cols="10" rows="2" formControlName="description" placeholder="Textarea">  </textarea>
	            </div>

<div class="clr-col-sm-12">
            <label>gender</label>
            <clr-radio-container clrInline style="margin-top: 0;"> 

 
   <clr-radio-wrapper>
                <input type="radio" clrRadio formControlName="gender" (change)="updategender('f')" [checked]="TestaentryForm.get('gender').value === 'f'" />
                <label> f </label>
              </clr-radio-wrapper>     
 

 
   <clr-radio-wrapper>
                <input type="radio" clrRadio formControlName="gender" (change)="updategender('m')" [checked]="TestaentryForm.get('gender').value === 'm'" />
                <label> m </label>
              </clr-radio-wrapper>     
 

    
 </clr-radio-container>
          </div> 




<!-- multiselect  field start -->
     <div class="clr-col-sm-12">       
		<label> Field Group</label>
	    <div class="clr-form-control" style="margin-top: 5px;margin-bottom: 10px;">
	      <div class="clr-control-container">

                      
 
			<div class="clr-col-sm-12">
 <label>  b</label>
 <input class="clr-input"  type="text"  formControlName="b" />       
 </div>
	                           

 
			<div class="clr-col-sm-12">
 <label>  f</label>
 <input class="clr-input"  type="text"  formControlName="f" />       
 </div>
	                           

 </div>       </div>     </div>
	              <!-- multiselect  field end -->

<!-- qrCode field start -->   
<div class="clr-col-sm-12">
	    <label>QRCode Field</label>
	    <input class="clr-input" type="text" formControlName="qrcode_field" />
	    <qrcode [qrdata]="TestaentryForm.value.qrcode_field  ? TestaentryForm.value.qrcode_field : '' " [width]="135" [errorCorrectionLevel]="'M'"  ></qrcode>   </div>
	<!-- qrCode field end -->

<div class="clr-col-sm-12">
 <label>  Number Field</label>
 <input class="clr-input"  type="number"  formControlName="number_field" />      
 <div *ngIf="submitted && TestaentryForm.controls.number_field.errors" class="error_mess">
  <div *ngIf="submitted && TestaentryForm.controls.number_field.errors.required" class="error_mess">*This field is Required</div>
</div>  
 </div>

<div class="clr-col-sm-12">             
 <label>  Textarea</label>             
 <textarea cols="10" rows="2" formControlName="textarea" placeholder="Textarea">  </textarea>
	            </div>

<div class="clr-col-sm-12">
 <label>  Date Field</label>
 <input class="clr-input"  type="date"  formControlName="date_field" />       
 </div>

<div class="clr-col-sm-12">
						<label> Email Field</label>
<input class="clr-input" type="email" formControlName="email_field" pattern="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$">
<div *ngIf="TestaentryForm.controls['email_field'].errors" class="error_mess">
						          <div *ngIf="TestaentryForm.controls['email_field'].hasError('pattern')" class="error_mess">* Email must be a valid email address
						            </div>  </div>
</div>

<div class="clr-col-sm-12">
 <label>  Datetime Field</label>
 <input class="clr-input"  type="datetime-local"  formControlName="datetime_field" />       
 </div>

<div class="clr-col-sm-12">            
 <label> Toggle Switch</label>            
  <input type="checkbox" formControlName="toggle_switch" clrToggle/>            </div>

<div class="clr-col-sm-12">           
<label> Decimal Field</label>          
 <input type="number" step ="0.01"  formControlName="decimal_field" /> 
 <div *ngIf="submitted && TestaentryForm.controls.decimal_field.errors" class="error_mess">
  <div *ngIf="submitted && TestaentryForm.controls.decimal_field.errors.required" class="error_mess">*This field is Required</div>
</div> 
        </div>





              </div>

























<h6> List of imageupload_field</h6>

 <div  class="clr-row" style="margin-top: 10px;">
   <table class="table">
       <thead>
        <tr>
        <th>No</th>
         <th> File</th>
         <th>File Name</th>
          <th>Preview</th>
          <th>Cancel</th>
           </tr>
         </thead>
         <tbody >
           <tr *ngFor="let attach of FileDataimageupload_field; let i=index">
             <td style="width: 70px;"><input type="text" class="clr-input"  value={{i+1}} [readonly]="true">  </td>
             <td><input type="file" (change)="onFileChangedimageupload_field($event, i)"  accept="image/*" /><!--accept=".pdf,.doc,.docx,.jpg,.msg"-->
              </td>
         <td>{{attach.uploadedfile_name}}</td>
             <td >  <img [src]="attach.filePreview" alt="File Preview"  [ngModelOptions]="{standalone: true}" name="filePreview" width="100px" height="100px"></td>
             <td>
               <a  (click)="deleteRowimageupload_field(i)">
                 <clr-icon shape="trash" class="is-error"></clr-icon>
               </a>
             </td>
           </tr>


       </tbody>
         <button type="button" class="btn btn-primary button1" style="margin-left: 20px;" (click)="onAddLinesimageupload_field()">
           <clr-icon shape="plus"></clr-icon>
         </button>

       </table> </div>

              <div class="clr-row">

              </div>
              <!-- end row -->
              <br>
<div class="button">
  <button type="submit" class="btn btn-primary" (click)="onbhjSave()">Submit</button>
  <button type="button" class="btn btn-primary"
    (click)="this.timelineStyle.step0 = { state: 'success', open: false };
             this.timelineStyle.step1 = { state: 'current', open: true }; this.current()">Complete</button>
  <button type="button" class="btn btn-primary"
    (click)="this.timelineStyle.step0 = { state: 'current', open: false };
             this.timelineStyle.step1 = { state: 'not-started', open: true }">Next</button>
</div>  </div>
          </form>

        </div>

      </div>
    </div> 
 <!--STEP 1-->  <div class="card" *ngIf="timelineStyle.step1.open">
      <div class="card-header">
        <h3 style="text-align: center;" *ngIf="!appToUpdate"> Review And Confirmation</h3>
        <div class="container">

          <!--  Info -->
   <div class="clr-row mb-3">
            <div class="clr-col-12">
              <h5>Bhj Summary:</h5><p><strong>Name : </strong> {{ TestaentryForm.get('name')?.value | json}}</p>

<p><strong>Description : </strong> {{ TestaentryForm.get('description')?.value | json}}</p>

<p><strong>gender : </strong> {{ TestaentryForm.get('gender')?.value | json}}</p>

 
 
<p><strong>b : </strong> {{ TestaentryForm.get('b')?.value | json}}</p>

 

 
<p><strong>f : </strong> {{ TestaentryForm.get('f')?.value | json}}</p>

 





<p><strong>QRCode Field : </strong> {{ TestaentryForm.get('qrcode_field')?.value | json}}</p>

<p><strong>Number Field : </strong> {{ TestaentryForm.get('number_field')?.value | json}}</p>

<p><strong>Textarea : </strong> {{ TestaentryForm.get('textarea')?.value | json}}</p>

<p><strong>Date Field : </strong> {{ TestaentryForm.get('date_field')?.value | json}}</p>

<p><strong>Email Field : </strong> {{ TestaentryForm.get('email_field')?.value | json}}</p>



 <p><strong>Datetime Field : </strong>
                {{ TestaentryForm.get('datetime_field')?.value
                ? (TestaentryForm.get('datetime_field')?.value | date:'medium')
                : 'No value found' }}
              </p>






<p><strong>Toggle Switch : </strong> {{ TestaentryForm.get('toggle_switch')?.value | json}}</p>

<p><strong>Decimal Field : </strong> {{ TestaentryForm.get('decimal_field')?.value | json}}</p>

<p><strong>Imageupload Field : </strong> {{ TestaentryForm.get('imageupload_field')?.value | json}}</p>


            </div>
          </div><div class="button">
  <button class="btn btn-primary-outline"
    (click)="this.timelineStyle.step0 = { state: 'current', open: true };
             this.timelineStyle.step1 = { state: 'not-started', open: false }">Back</button>
  <button class="btn btn-primary"
    (click)="timelineStyle.step1 = { state: 'success', open: false }; current();
             alert('Process Finished Successfully!')">Finish</button>
</div></div>
      </div>
    </div>