import SidebarListElementForm_default from "./SidebarListElementForm.vue.js";
import { createBlock, createVNode, defineComponent, openBlock, ref, unref, withCtx } from "vue";
import { ScalarTextInput } from "@scalar/components";
//#region src/components/Sidebar/Actions/EditSidebarListElement.vue?vue&type=script&setup=true&lang.ts
var EditSidebarListElement_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
	__name: "EditSidebarListElement",
	props: { name: {} },
	emits: ["close", "edit"],
	setup(__props, { emit: __emit }) {
		const props = __props;
		const emit = __emit;
		const newName = ref(props.name);
		return (_ctx, _cache) => {
			return openBlock(), createBlock(SidebarListElementForm_default, {
				onCancel: _cache[1] || (_cache[1] = ($event) => emit("close")),
				onSubmit: _cache[2] || (_cache[2] = ($event) => emit("edit", newName.value))
			}, {
				default: withCtx(() => [createVNode(unref(ScalarTextInput), {
					modelValue: newName.value,
					"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => newName.value = $event),
					autofocus: ""
				}, null, 8, ["modelValue"])]),
				_: 1
			});
		};
	}
});
//#endregion
export { EditSidebarListElement_vue_vue_type_script_setup_true_lang_default as default };

//# sourceMappingURL=EditSidebarListElement.vue.script.js.map