var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
import { booleanConverter, CssProperty, CSSType, Property, Style, View } from '@nativescript/core';
import { DOMParser, XMLSerializer } from '@xmldom/xmldom';
export * from './Elements';
export const strokeProperty = new CssProperty({
    name: 'stroke',
    cssName: 'stroke',
    defaultValue: undefined,
});
export const strokeWidthProperty = new CssProperty({
    name: 'strokeWidth',
    cssName: 'stroke-width',
    defaultValue: 1,
});
export const fillProperty = new CssProperty({
    name: 'fill',
    cssName: 'fill',
    defaultValue: undefined,
});
export const fillRuleProperty = new CssProperty({
    name: 'fillRule',
    cssName: 'fill-rule',
    defaultValue: undefined,
});
export const fillOpacityProperty = new CssProperty({
    name: 'fillOpacity',
    cssName: 'fill-opacity',
    defaultValue: undefined,
});
export const stopColorProperty = new CssProperty({
    name: 'stopColor',
    cssName: 'stop-color',
    defaultValue: undefined,
});
export const strokeLinecapProperty = new CssProperty({
    name: 'strokeLinecap',
    cssName: 'stroke-linecap',
});
export const strokeLinejoinProperty = new CssProperty({
    name: 'strokeLinejoin',
    cssName: 'stroke-linejoin',
});
export const strokeMiterlimitProperty = new CssProperty({
    name: 'strokeMiterlimit',
    cssName: 'stroke-miterlimit',
});
export const srcProperty = new Property({
    name: 'src',
});
export const syncProperty = new Property({
    name: 'sync',
    defaultValue: false,
    valueConverter: booleanConverter,
});
export const initialSVG = '<svg xmlns="http://www.w3.org/2000/svg"></svg>';
let SVGBase = class SVGBase extends View {
    constructor() {
        super();
        this.__children = [];
        this._attachedToDom = false;
        this.__domElement = new DOMParser().parseFromString(initialSVG, 'image/svg+xml').documentElement;
        this._serializer = new XMLSerializer();
    }
};
SVGBase.readyEvent = 'ready';
SVGBase = __decorate([
    CSSType('Svg'),
    __metadata("design:paramtypes", [])
], SVGBase);
export { SVGBase };
syncProperty.register(SVGBase);
srcProperty.register(SVGBase);
stopColorProperty.register(Style);
strokeWidthProperty.register(Style);
strokeProperty.register(Style);
fillProperty.register(Style);
fillOpacityProperty.register(Style);
fillRuleProperty.register(Style);
strokeLinecapProperty.register(Style);
strokeLinejoinProperty.register(Style);
strokeMiterlimitProperty.register(Style);
//# sourceMappingURL=common.js.map