{"size": 1412, "ext": "js", "max_stars_repo_path": "lesson_21/dom.js", "max_stars_repo_name": "LuckySava/js_course", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "lesson_21/dom.js", "max_issues_repo_name": "LuckySava/js_course", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "lesson_21/dom.js", "max_forks_repo_name": "LuckySava/js_course", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 30.0425531915, "max_line_length": 68, "alphanum_fraction": 0.585694051}
// export default class Dom {
//     constructor() {
//         this.firstField = document.getElementById("field1"),
//             this.secondField = document.getElementById("field2"),
//             this.thirdField = document.getElementById("field3"),
//             this.forthField = document.getElementById("field4"),
//             this.preload = document.getElementById("preload");
//     }
//     showPreloader() {

//         this.preload.classList.add("preloading");
//     }
//     hidePreloader() {

//         setTimeout(() => {
//             this.preload.classList.remove("preloading");
//         }, 1000);

//     }
//     setCoordinates(coordinate) {
//             this.firstField.value = coordinate.country_name;
//             this.secondField.value = coordinate.city;
//             this.thirdField.value = coordinate.longitude;
//             this.forthField.value = coordinate.latitude;
//     }
// }

export default class Dom {
    constructor() {
      this.preloader = document.getElementById('preloader');
      this.location = document.getElementById('location');
    }
  
    showPreloader() {
      this.preloader.style.opacity = 1;
    //   this.location.style.opacity = 0;
    }
  
    hidePreloader() {
      this.preloader.style.opacity = 0;
      this.location.style.opacity = 1;
    }
  
    setCoordinates(coordinates) {
      this.location.innerHTML = coordinates;
    }
  }