/**
 * Represents a camera frame object.
 *
 * @public
 */
export var CameraFrame;
(function (CameraFrame) {
    /**
     * Parses a camera frame.
     *
     * @public
     * @param frame - The camera frame to parse.
     * @returns The parsed camera frame.
     */
    function parse(frame) {
        if (typeof frame === 'string') {
            const [width, height] = frame.split(':');
            return {
                width: parseFloat(width),
                height: parseFloat(height)
            };
        }
        return frame;
    }
    CameraFrame.parse = parse;
    /**
     * Converts a camera frame to an aspect ratio.
     *
     * @public
     * @param frame - The camera frame to convert.
     * @returns The aspect ratio of the camera frame.
     */
    function toAspectRatio(frame) {
        const { width, height } = parse(frame);
        return width / height;
    }
    CameraFrame.toAspectRatio = toAspectRatio;
})(CameraFrame || (CameraFrame = {}));
/**
 * Represents the camera frames.
 *
 * @public
 */
export var CameraFrames;
(function (CameraFrames) {
    /**
     * The ID1 format is used for the ID card.
     *
     * @public
     * @property {number} width - The width of the ID1 format in millimeters.
     * @property {number} height - The height of the ID1 format in millimeters.
     */
    CameraFrames.ID1 = {
        width: 85.6,
        height: 53.98
    };
    /**
     * The ID2 format is used for the ID card.
     *
     * @public
     * @property {number} width - The width of the ID2 format in millimeters.
     * @property {number} height - The height of the ID2 format in millimeters.
     */
    CameraFrames.ID2 = {
        width: 105,
        height: 74
    };
    /**
     * The ID3 format is used for the ID card.
     *
     * @public
     * @property {number} width - The width of the ID3 format in millimeters.
     * @property {number} height - The height of the ID3 format in millimeters.
     */
    CameraFrames.ID3 = {
        width: 125,
        height: 88
    };
})(CameraFrames || (CameraFrames = {}));
//# sourceMappingURL=CameraFrame.js.map