import type { ReactElement, HTMLAttributes, Ref } from "react";
import type SlIncludeElement from "@shoelace-style/shoelace/dist/components/include/include.js";
import { SlLoadEvent, SlErrorEvent } from "../events";
export type { SlIncludeElement };
export type SlIncludeLoadEvent = SlLoadEvent;
export type SlIncludeErrorEventDetail = { status: number };
export type SlIncludeErrorEvent = SlErrorEvent<
SlIncludeElement,
SlErrorEventDetail
>;
export interface SlIncludeProps extends HTMLAttributes {
ref?: Ref;
/**
* The location of the HTML file to include. Be sure you trust the content you are including as it will be executed as
* code and can result in XSS attacks.
*/
src?: string;
/**
* The fetch mode to use.
*/
mode?: "cors" | "no-cors" | "same-origin";
/**
* Allows included scripts to be executed. Be sure you trust the content you are including as it will be executed as
* code and can result in XSS attacks.
*/
allowScripts?: boolean;
/**
* Emitted when the included file is loaded.
*/
onSlLoad?: (event: SlIncludeLoadEvent) => void;
/**
* Emitted when the included file is loaded.
*/
onSlLoadCapture?: (event: SlIncludeLoadEvent) => void;
/**
* Emitted when the included file fails to load due to an error.
*/
onSlError?: (event: SlIncludeErrorEvent) => void;
/**
* Emitted when the included file fails to load due to an error.
*/
onSlErrorCapture?: (event: SlIncludeErrorEvent) => void;
}
/**
* Includes give you the power to embed external HTML files into the page.
*/
export default function SlInclude(
props: SlIncludeProps,
): ReactElement;