"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DEFAULT_CLUSTERED_LAYER_STYLE = exports.DEFAULT_VECTOR_LAYER_STYLE = exports.DEFAULT_POLY_STYLE = exports.DEFAULT_LINE_STYLE = exports.DEFAULT_COLOR = exports.DEFAULT_POINT_ICON_STYLE = exports.DEFAULT_CLUSTERED_POINT_CIRCLE_STYLE = exports.DEFAULT_POINT_CIRCLE_STYLE = exports.isEvaluatable = exports.ClusterClickAction = exports.VectorStyleSource = void 0;
var assets_1 = require("../constants/assets");
/**
 * The source of a vector layer style
 *
 * @since 0.14
 */
var VectorStyleSource;
(function (VectorStyleSource) {
    /**
     * The base vector layer style
     */
    VectorStyleSource[VectorStyleSource["Base"] = 0] = "Base";
    /**
     * The clustered layer style
     */
    VectorStyleSource[VectorStyleSource["Cluster"] = 1] = "Cluster";
})(VectorStyleSource = exports.VectorStyleSource || (exports.VectorStyleSource = {}));
/**
 * @since 0.14
 */
var ClusterClickAction;
(function (ClusterClickAction) {
    ClusterClickAction["ZoomToClusterExtents"] = "ZoomToClusterExtents";
    ClusterClickAction["ShowPopup"] = "ShowPopup";
})(ClusterClickAction = exports.ClusterClickAction || (exports.ClusterClickAction = {}));
/**
 * @since 0.14
 */
function isEvaluatable(arg) {
    return typeof (arg === null || arg === void 0 ? void 0 : arg.expr) == 'string';
}
exports.isEvaluatable = isEvaluatable;
/**
 * The default style for point features
 * @since 0.13
 * @since 0.14 Made deep const immutable
 */
exports.DEFAULT_POINT_CIRCLE_STYLE = {
    type: "Circle",
    fill: {
        color: "#ff0000",
        alpha: 255
    },
    radius: 5,
    stroke: {
        color: "#0000ff",
        alpha: 255,
        width: 1
    }
};
/**
 * The default style for clustered point features
 * @since 0.14
 */
exports.DEFAULT_CLUSTERED_POINT_CIRCLE_STYLE = {
    type: "Circle",
    fill: {
        color: "#ff0000",
        alpha: 255
    },
    radius: { expr: "min(arr_size(features) + 4, 25)" },
    /*
    label: {
        text: expr("if(arr_size(features) > 1, '', arr_size(features))"),
    },*/
    stroke: {
        color: "#0000ff",
        alpha: 255,
        width: 1
    }
};
/**
 * The default icon style for point features
 * @since 0.13
 * @since 0.14 Made deep const immutable
 */
exports.DEFAULT_POINT_ICON_STYLE = {
    type: "Icon",
    anchor: [0.5, 0.5],
    src: assets_1.MAP_MARKER_ICON,
    //size: [24, 24],
    rotateWithView: false,
    rotation: 0,
    //opacity: 255,
    scale: 1
};
/**
 * The default color
 * @since 0.13
 */
exports.DEFAULT_COLOR = "#000000";
/**
 * The default style for line features
 * @since 0.13
 * @since 0.14 Made deep const immutable
 */
exports.DEFAULT_LINE_STYLE = {
    color: "#0000ff",
    alpha: 255,
    width: 1
};
/**
 * The default style for polygon features
 * @since 0.13
 * @since 0.14 Made deep const immutable
 */
exports.DEFAULT_POLY_STYLE = {
    fill: {
        color: "#00ff00",
        alpha: 255
    },
    stroke: {
        color: exports.DEFAULT_COLOR,
        alpha: 255,
        width: 1
    }
};
/**
 * The default vector layer style
 * @since 0.14
 */
exports.DEFAULT_VECTOR_LAYER_STYLE = {
    default: {
        point: exports.DEFAULT_POINT_CIRCLE_STYLE,
        line: exports.DEFAULT_LINE_STYLE,
        polygon: exports.DEFAULT_POLY_STYLE
    }
};
/**
 * The default vector layer style for clustered points
 * @since 0.14
 */
exports.DEFAULT_CLUSTERED_LAYER_STYLE = {
    default: {
        point: exports.DEFAULT_CLUSTERED_POINT_CIRCLE_STYLE
    }
};
//# sourceMappingURL=ol-style-contracts.js.map