"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PreserveAspectRatio = void 0;
const SVGInstance_js_1 = require("../../../browser/instance/SVGInstance.js");
class PreserveAspectRatio extends SVGInstance_js_1.SVGInstance {
    preserveAspectRatio(align, meetOrSlice) {
        if (typeof align === "undefined" && typeof meetOrSlice === "undefined") {
            const preserveAspectRatio = this.attr("preserveAspectRatio");
            if (typeof preserveAspectRatio === "string") {
                const [align, meetOrSlice] = preserveAspectRatio.split(" ");
                return { align, meetOrSlice };
            }
        }
        else if (typeof align === "string" && typeof meetOrSlice === "string") {
            this.attr("preserveAspectRatio", `${align} ${meetOrSlice}`);
            return this;
        }
        else if (typeof align === "string" && typeof meetOrSlice === "undefined") {
            this.attr("preserveAspectRatio", align);
            return this;
        }
        return null;
    }
}
exports.PreserveAspectRatio = PreserveAspectRatio;
//# sourceMappingURL=preserveAspectRatio.js.map