"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BackgroundImageParser = void 0;
const utils_1 = require("../../../utils");
const style_parser_1 = require("../style.parser");
class BackgroundImageParser extends style_parser_1.StyleParser {
    constructor() {
        super('uri');
    }
    parse(url) {
        if (url) {
            url = (0, utils_1.fromUnicode)(url);
            if (url.startsWith('bind:')) {
                url = url.replace('bind:', `bind:fragment.handleUrl(`) + ')';
            }
            else {
                url = `bind:fragment.handleUrl('${url}')`;
            }
        }
        return { 'uri': url };
    }
}
exports.BackgroundImageParser = BackgroundImageParser;
//# sourceMappingURL=background-image.parser.js.map