import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { useIntl } from "react-intl";
import { ConfigSubsection } from "./ConfigSubsection.js";
import { DropdownControl } from "./DropdownControl.js";
import { messages } from "../../../locales.js";
import { pushpinSizeDropdownItems } from "../../constants/dropdowns.js";
import { getTranslatedDropdownItems } from "../../utils/translations.js";
function getPushpinProperty(props) {
    const { minSize = "default", maxSize = "default" } = props.properties?.controls?.["points"] ?? {};
    return {
        minSize,
        maxSize,
    };
}
export function PushpinSizeControl(props) {
    const intl = useIntl();
    const { minSize, maxSize } = getPushpinProperty(props);
    const { disabled, properties, pushData } = props;
    const items = getTranslatedDropdownItems(pushpinSizeDropdownItems, intl);
    return (_jsxs(ConfigSubsection, { title: messages["pointsSizeTitle"].id, children: [
            _jsx(DropdownControl, { value: minSize, valuePath: "points.minSize", labelText: messages["pointsSizeMinTitle"].id, disabled: disabled, showDisabledMessage: disabled, properties: properties, pushData: pushData, items: items }), _jsx(DropdownControl, { value: maxSize, valuePath: "points.maxSize", labelText: messages["pointsSizeMaxTitle"].id, disabled: disabled, showDisabledMessage: disabled, properties: properties, pushData: pushData, items: items })
        ] }));
}
//# sourceMappingURL=PushpinSizeControl.js.map