import { useTranslation } from "react-i18next";
import { useCompile } from "../../schema-component/index.mjs";
import { useHookDefault } from "./util.mjs";
function createTextSettingsItem(options) {
    const { name, useVisible, title, useTextClick = useHookDefault } = options;
    return {
        name,
        type: 'item',
        useVisible,
        useComponentProps () {
            const compile = useCompile();
            const { t } = useTranslation();
            const onClick = useTextClick();
            return {
                title: 'function' == typeof title ? title(t) : compile(title),
                onClick
            };
        }
    };
}
export { createTextSettingsItem };
