import * as vue from "vue";
import { defineComponent, mergeProps, unref, useSSRContext } from "vue";
import { ssrRenderAttrs, ssrRenderList, 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.2544f8a4.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";
const _sfc_main = /* @__PURE__ */ defineComponent({
  __name: "InputWeight",
  __ssrInlineRender: true,
  props: {
    min: { type: [String, Number], default: "1" },
    max: { type: [String, Number], default: "10" },
    modelValue: { type: [String, Number], default: "" }
  },
  emits: ["update:modelValue"],
  setup(__props, { emit }) {
    const props = __props;
    const range = vue.computed(() => {
      const out = [];
      const min = +props.min;
      const max = +props.max;
      for (let i = min; i <= max; i++) {
        out.push(i);
      }
      return out;
    });
    const buttonClass = (v, i) => {
      const out = [
        "relative",
        "inline-flex",
        "items-center",
        "border",
        "px-3",
        "py-input-y",
        "text-input-size",
        "focus:z-10",
        "focus:outline-none",
        "focus:border-primary"
      ];
      if (i == 0) {
        out.push("rounded-l-input");
      } else if (i == range.value.length - 1) {
        out.push("rounded-r-input");
      }
      if (i != 0) {
        out.push("-ml-px");
      }
      if (props.modelValue === v) {
        out.push("bg-theme-400 border-theme-600 text-theme-0 z-20");
      } else {
        out.push(
          "bg-theme-100 text-theme-700 border-theme-300 hover:bg-theme-200 hover:border-theme-400 hover:z-20"
        );
      }
      return out.join(" ");
    };
    return (_ctx, _push, _parent, _attrs) => {
      _push(`<span${ssrRenderAttrs(mergeProps({ class: "relative z-0 inline-flex rounded-md shadow-sm" }, _attrs))}><!--[-->`);
      ssrRenderList(unref(range), (r, i) => {
        _push(`<button type="button" class="${ssrRenderClass(buttonClass(r, i))}">${ssrInterpolate(r)}</button>`);
      });
      _push(`<!--]--></span>`);
    };
  }
});
const _sfc_setup = _sfc_main.setup;
_sfc_main.setup = (props, ctx) => {
  const ssrContext = useSSRContext();
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("../ui/InputWeight.vue");
  return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
};
export {
  _sfc_main as default
};
