import * as vue from "vue";
import { defineComponent, mergeProps, unref, useSSRContext } from "vue";
import { ssrRenderAttrs, ssrRenderClass, ssrInterpolate } from "vue/server-renderer";
import "../mount.js";
import "path-browserify";
import "deepmerge";
import "fast-safe-stringify";
import "spark-md5";
import "is-plain-object";
import "js-cookie";
import "events";
import "http";
import "@medv/finder";
import "front-matter";
import "markdown-it";
import "markdown-it-anchor";
import "markdown-it-implicit-figures";
import "markdown-it-link-attributes";
import "markdown-it-video";
import "remove-markdown";
import "./index.b92a68c6.js";
import "body-parser";
import "dotenv";
import "compression";
import "serve-favicon";
import "serve-static";
import "html-minifier";
import "vite";
import "@vue/server-renderer";
import "fs";
import "enquirer";
import "semver";
import "glob";
import "minimist";
import "handlebars";
import "execa";
import "multer";
import "sharp";
import "@vitejs/plugin-vue";
import "express";
import "axios";
import "knex";
import "dompurify";
import "dayjs";
import "chalk";
import "dayjs/plugin/relativeTime.js";
import "dayjs/plugin/utc.js";
import "dayjs/plugin/timezone.js";
import "dayjs/plugin/updateLocale.js";
import "dayjs/plugin/weekOfYear.js";
import "nanoid";
import "prettyoutput";
import "consola";
import "validator";
import "@vueuse/head";
import "node-fetch";
import "vue-router";
import "jsonwebtoken";
import "fs-extra";
import "bcrypt";
import "knex-stringcase";
import "@sinclair/typebox";
import "nodemailer";
import "nodemailer-html-to-text";
import "@tailwindcss/forms";
import "unocss/vite";
import "@unocss/preset-icons";
import "nodemon";
import "gravatar-url";
const _sfc_main = /* @__PURE__ */ defineComponent({
  __name: "InputToggle",
  __ssrInlineRender: true,
  props: {
    modelValue: { type: [Boolean, String], default: false },
    textOff: { type: String, default: "" },
    textOn: { type: String, default: "" }
  },
  emits: ["update:modelValue"],
  setup(__props, { emit }) {
    const props = __props;
    const attrs = vue.useAttrs();
    const val = vue.computed(() => {
      const mv = props.modelValue;
      if (typeof mv == "string") {
        if (mv == "on" || mv == "true")
          return true;
        else
          return false;
      } else
        return mv;
    });
    return (_ctx, _push, _parent, _attrs) => {
      _push(`<label${ssrRenderAttrs(mergeProps({ class: "toggle-wrap flex items-center py-1" }, _attrs))}><input${ssrRenderAttrs(mergeProps({ class: "absolute h-1 w-1 opacity-0" }, unref(attrs), {
        type: "checkbox",
        value: unref(val),
        checked: unref(val)
      }))}><button type="button" aria-pressed="false" class="${ssrRenderClass([unref(val) == true ? "bg-primary-600" : "bg-theme-300", "relative inline-flex h-6 w-12 shrink-0 cursor-pointer rounded-full border-4 border-transparent transition-colors duration-200 ease-in-out focus:outline-none"])}"><span class="sr-only">${ssrInterpolate(unref(val) ? "on" : "off")}</span><span aria-hidden="true" class="${ssrRenderClass([
        unref(val) == true ? "translate-x-6 bg-primary-0 ring-primary-600" : "translate-x-0 bg-theme-0 ring-theme-300",
        "inline-block h-4 w-4 rounded-full ring-4 transition duration-200 ease-in-out"
      ])}"></span></button>`);
      if (__props.textOn || __props.textOff) {
        _push(`<span id="toggleLabel" class="text-input-size text-theme-600 hover:text-primary ml-4 cursor-pointer">`);
        if (unref(val)) {
          _push(`<span>${ssrInterpolate(__props.textOn)}</span>`);
        } else {
          _push(`<span>${ssrInterpolate(__props.textOff)}</span>`);
        }
        _push(`</span>`);
      } else {
        _push(`<!---->`);
      }
      _push(`</label>`);
    };
  }
});
const _sfc_setup = _sfc_main.setup;
_sfc_main.setup = (props, ctx) => {
  const ssrContext = useSSRContext();
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("../ui/InputToggle.vue");
  return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
};
export {
  _sfc_main as default
};
