import { Vector3 } from '../utils';
export class EntityBone {
    constructor(owner, boneIndex, boneName) {
        this.owner = owner;
        this.index = boneIndex
            ? boneIndex
            : GetEntityBoneIndexByName(this.owner.Handle, boneName !== null && boneName !== void 0 ? boneName : '');
    }
    get Index() {
        return this.index;
    }
    get Owner() {
        return this.owner;
    }
    get Position() {
        const coords = GetWorldPositionOfEntityBone(this.owner.Handle, this.index);
        return new Vector3(coords[0], coords[1], coords[2]);
    }
    get IsValid() {
        return this.owner.exists() && this.index !== -1;
    }
}
