import { hasSlotContent as e } from "../../common/utils/index.js";
import { t } from "../../_plugin-vue_export-helper-BTgDAbhb.js";
import n from "../validation-messages/validation-messages.js";
import { InputGroupMixin as r } from "../../common/mixins/input-group.js";
import { createCommentVNode as i, createElementBlock as a, createTextVNode as o, createVNode as s, mergeProps as c, openBlock as l, renderSlot as u, resolveComponent as d, toDisplayString as f } from "vue";
//#region components/input_group/input_group.vue
var p = {
	compatConfig: { MODE: 3 },
	name: "DtInputGroup",
	components: { DtValidationMessages: n },
	mixins: [r],
	props: {
		dataQaGroup: {
			type: String,
			default: "input-group"
		},
		dataQaGroupLegend: {
			type: String,
			default: "input-group-legend"
		},
		dataQaGroupMessages: {
			type: String,
			default: "input-group-messages"
		}
	},
	data() {
		return {
			internalValue: this.value,
			hasSlotContent: e
		};
	},
	watch: {
		value(e) {
			this.internalValue = e;
		},
		internalValue: {
			immediate: !0,
			handler(e) {
				this.provideObj.value = e;
			}
		}
	},
	methods: { getMessageKey(e, t) {
		return `input-group-message-${e}-${t}-${this.id}`;
	} }
}, m = ["data-qa"], h = ["data-qa"];
function g(e, t, n, r, p, g) {
	let _ = d("dt-validation-messages");
	return l(), a("fieldset", {
		class: "d-input-group__fieldset",
		"data-qa": n.dataQaGroup
	}, [
		p.hasSlotContent(e.$slots.legend) || e.legend ? (l(), a("legend", c({
			key: 0,
			class: ["d-label", e.legendClass]
		}, e.legendChildProps, { "data-qa": n.dataQaGroupLegend }), [u(e.$slots, "legend", {}, () => [o(f(e.legend), 1)])], 16, h)) : i("", !0),
		u(e.$slots, "default"),
		s(_, c({
			"validation-messages": e.formattedMessages,
			"show-messages": e.showMessages,
			class: e.messagesClass,
			"data-qa": n.dataQaGroupMessages
		}, e.messagesChildProps), null, 16, [
			"validation-messages",
			"show-messages",
			"class",
			"data-qa"
		])
	], 8, m);
}
var _ = /* @__PURE__ */ t(p, [["render", g]]);
//#endregion
export { _ as default };

//# sourceMappingURL=input-group.js.map