"use strict";
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
    if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
    if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
    return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
};
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
    if (kind === "m") throw new TypeError("Private method is not writable");
    if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
    if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
    return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
};
var _Employee_id;
Object.defineProperty(exports, "__esModule", { value: true });
//implements là để thực hiện các phương thức và thuộc tính của interface
class Employee {
    get empId() {
        return __classPrivateFieldGet(this, _Employee_id, "f");
    }
    set empId(id) {
        __classPrivateFieldSet(this, _Employee_id, id, "f");
    }
    static getEmployeeCount() {
        return 50;
    }
    constructor(id, name, address) {
        _Employee_id.set(this, void 0);
        __classPrivateFieldSet(this, _Employee_id, id, "f");
        this.name = name;
        this.address = address;
    }
    login() {
        return { name: "John Doe", id: 1, email: "" };
    }
    getNameWithAddress() {
        return `${this.name} lives at ${this.address}.`;
    }
}
_Employee_id = new WeakMap();
let john = new Employee(1, "John Doe", { "street": "123 Main St", "city": "Anytown", "state": "CA", "pin": "12345" });
// Employee.getEmployeeCount(); // Static method call
john.empId = 100;
console.log(john.empId);
class Manager extends Employee {
    constructor(id, name, address) {
        super(id, name, address);
    }
    getNameWithAddress() {
        return `Manager ${this.name} lives at ${this.address}.`;
    }
}
let address = john.getNameWithAddress();
let mike = new Manager(2, "Mike Smith", { "street": "456 Elm St", "city": "Othertown", "state": "NY", "pin": "67890" });
// john.id = 1;
// john.name = "John Doe";
// john.address = "123 Main St";
console.log(john);
console.log(address);
console.log(mike.getNameWithAddress());
//# sourceMappingURL=class.js.map