<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/ddd<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">ddd</h3>
        <h3 style="text-align: center;" *ngIf="appToUpdate"> Update {{FormaentryForm.name}}</h3>
        <div class="container">

          <br />

        
          <form [formGroup]="FormaentryForm">

            <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>  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>  Datetime Field</label>
 <input class="clr-input"  type="datetime-local"  formControlName="datetime_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="entryForm.controls['email_field'].errors" class="error_mess">
						          <div *ngIf="entryForm.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> Url Field </label>
		<input type="url" formControlName="url_field" class="clr-input" pattern="https?://.+">
		<div *ngIf="entryForm.controls['url_field'].errors" class="error_mess">          
			 <div *ngIf="entryForm.controls['url_field'].hasError('pattern')" class="error_mess">    * Please enter a valid URL.</div>
						      </div>     </div>

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


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


              </div>

















              <div class="clr-row">

              </div>
              <!-- end row -->
              <br>
<div class="button">
  <button type="submit" class="btn btn-primary" (click)="ondddSave()">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>ddd Summary:</h5><p><strong>Name : </strong> {{ FormaentryForm.get('name')?.value }}</p>

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

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

<p><strong>Datetime Field : </strong> {{ FormaentryForm.get('datetime_field')?.value }}</p>

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

<p><strong>Url Field : </strong> {{ FormaentryForm.get('url_field')?.value }}</p>

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

<p><strong>Percentage Field : </strong> {{ FormaentryForm.get('percentage_field')?.value }}</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>