
<admin-page-header [title]="'Google Analytics'" ></admin-page-header>

<div class="col-xl-12 col-lg-12 col-md-12">
    <div class="card ">
        <div class="card-header border-0">
            <h4 class="card-title">{{'Google Analytics' | translate}}</h4>
        </div>
        <form #FormData="ngForm" (ngSubmit)="GoogleAnalytics(FormData.value, 'googleAnalytics')">
            <div class="card-body" >
                <div class="col-sm-6 col-md-6">
                    <div class="switch_section">
                        <div class="switch-toggle d-flex">
                            <span class="onoffswitch2">
                                <input type="checkbox" id="myonoffswitch18" ngModel name="GOOGLE_ANALYTICS_ENABLE" class=" toggle-class onoffswitch2-checkbox"
                                [checked]="responce?.GOOGLE_ANALYTICS_ENABLE == 'yes' ? true : false"
                                [ngModel]="responce?.GOOGLE_ANALYTICS_ENABLE == 'yes' ? true : false">
                                <label for="myonoffswitch18" class="toggle-class onoffswitch2-label"></label>
                            </span>
                            <label class="form-label ps-3">{{'Enable Google Analytics' | translate}}</label>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6 col-md-6 ">
                    <div class="form-group ">
                        <label class="form-label">{{'Tracking ID' | translate}}</label>
                        <input type="text"  class="form-control" [ngModel]="responce?.GOOGLE_ANALYTICS"  name="GOOGLE_ANALYTICS">
                    </div>
                </div>
            </div>
            <div class="col-md-12 card-footer ">
                <div class="form-group float-end">
                    <button [disabled]="sendingResponse['googleAnalytics']" type="submit" class="btn btn-secondary">{{'Save Changes' | translate}}
                        @if(sendingResponse['googleAnalytics']){
                        <i class="fa fa-spinner fa-spin mx-1"></i>
                    }</button>
                </div>
            </div>
        </form>
    </div>
</div>