import { i as is_void } from './utils-Bmu7F6be.js';
import { Z as svelte_element_invalid_this_value, _ as store_invalid_shape, $ as snippet_without_render_tag } from './index-CsuPqJBw.js';

/* This file is generated by scripts/process-messages/index.js. Do not edit! */


/**
 * `<svelte:element this="%tag%">` is a void element — it cannot have content
 * @param {string} tag
 */
function dynamic_void_element_content(tag) {
	{
		console.warn(`https://svelte.dev/e/dynamic_void_element_content`);
	}
}

/**
 * @param {() => string} tag_fn
 * @returns {void}
 */
function validate_void_dynamic_element(tag_fn) {
	const tag = tag_fn();
	if (tag && is_void(tag)) {
		dynamic_void_element_content();
	}
}

/** @param {() => unknown} tag_fn */
function validate_dynamic_element_tag(tag_fn) {
	const tag = tag_fn();
	const is_string = typeof tag === 'string';
	if (tag && !is_string) {
		svelte_element_invalid_this_value();
	}
}

/**
 * @param {any} store
 * @param {string} name
 */
function validate_store(store, name) {
	if (store != null && typeof store.subscribe !== 'function') {
		store_invalid_shape();
	}
}

/**
 * @template {(...args: any[]) => unknown} T
 * @param {T} fn
 */
function prevent_snippet_stringification(fn) {
	fn.toString = () => {
		snippet_without_render_tag();
		return '';
	};
	return fn;
}

export { validate_store as a, validate_void_dynamic_element as b, prevent_snippet_stringification as p, validate_dynamic_element_tag as v };
