import { _ as _sfc_main$2 } from './second-title-B9UcHZfY.mjs';
import { a as useNuxtApp, e as useMaghaleStore, f as useRouter, _ as __nuxt_component_0, b as useRuntimeConfig } from './server.mjs';
import { reactive, ref, mergeProps, unref, withCtx, createBlock, createVNode, openBlock, defineComponent, provide, createElementBlock, useSSRContext } from 'vue';
import { ssrRenderAttrs, ssrRenderComponent, ssrRenderAttr, ssrRenderList, ssrInterpolate, ssrIncludeBooleanAttr, ssrLooseContain, ssrLooseEqual } from 'vue/server-renderer';
import axios from 'axios';
import { _ as _export_sfc } from './_plugin-vue_export-helper-1tPrXgE0.mjs';
import '../_/nitro.mjs';
import 'node:http';
import 'node:https';
import 'node:events';
import 'node:buffer';
import 'node:fs';
import 'node:path';
import 'node:crypto';
import 'node:url';
import '../routes/renderer.mjs';
import 'vue-bundle-renderer/runtime';
import 'unhead/server';
import 'devalue';
import 'unhead/plugins';
import 'unhead/utils';
import 'pinia';
import 'vue-router';
import 'deep-pick-omit';
import 'sweetalert2';

const clientOnlySymbol = Symbol.for("nuxt:client-only");
const __nuxt_component_2 = defineComponent({
  name: "ClientOnly",
  inheritAttrs: false,
  props: ["fallback", "placeholder", "placeholderTag", "fallbackTag"],
  setup(_, { slots, attrs }) {
    const mounted = ref(false);
    provide(clientOnlySymbol, true);
    return (props) => {
      var _a;
      if (mounted.value) {
        return (_a = slots.default) == null ? void 0 : _a.call(slots);
      }
      const slot = slots.fallback || slots.placeholder;
      if (slot) {
        return slot();
      }
      const fallbackStr = props.fallback || props.placeholder || "";
      const fallbackTag = props.fallbackTag || props.placeholderTag || "span";
      return createElementBlock(fallbackTag, attrs, fallbackStr);
    };
  }
});
const _sfc_main$1 = {
  __name: "addForm",
  __ssrInlineRender: true,
  setup(__props) {
    const { $CustomAlert } = useNuxtApp();
    const store = useMaghaleStore();
    useRouter();
    const hypers = reactive({ data: [] });
    async function getHypers() {
      await axios.get(useRuntimeConfig().public.BaseUrl + "projects/my_hypers_title").then((r) => {
        hypers.data = r.data;
      });
    }
    getHypers();
    const form = reactive({
      hyper: store.hyper.id
    });
    const activity = reactive({
      title: "",
      abstract: ""
    });
    ref(0);
    ref("");
    ref(null);
    const imagePreview = ref(null);
    return (_ctx, _push, _parent, _attrs) => {
      const _component_MaghaleSecondTitle = _sfc_main$2;
      const _component_NuxtLink = __nuxt_component_0;
      const _component_ClientOnly = __nuxt_component_2;
      _push(`<div${ssrRenderAttrs(mergeProps({ class: "" }, _attrs))}>`);
      _push(ssrRenderComponent(_component_MaghaleSecondTitle, { title: "\u0627\u0641\u0632\u0648\u062F\u0646 \u067E\u0631\u0648\u0698\u0647" }, null, _parent));
      _push(`<form class="max-w-sm mx-auto" dir="rtl"><div class="flex mt-4">`);
      _push(ssrRenderComponent(_component_NuxtLink, {
        to: ("useRuntimeConfig" in _ctx ? _ctx.useRuntimeConfig : unref(useRuntimeConfig))().public.router.HyperAdd,
        class: "shrink-0 z-10 inline-flex items-center py-1.5 px-4 text-sm font-medium text-center text-zinc-500 bg-zinc-100 border border-zinc-300 rounded-s-lg hover:bg-zinc-200 focus:ring-4 focus:outline-none focus:ring-zinc-100 dark:bg-zinc-700 dark:hover:bg-zinc-600 dark:focus:ring-zinc-700 dark:text-white dark:border-zinc-600"
      }, {
        default: withCtx((_, _push2, _parent2, _scopeId) => {
          if (_push2) {
            _push2(`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-5 ml-2 text-zinc-950 dark:text-white"${_scopeId}><path stroke-linecap="round" stroke-linejoin="round" d="M13.5 16.875h3.375m0 0h3.375m-3.375 0V13.5m0 3.375v3.375M6 10.5h2.25a2.25 2.25 0 0 0 2.25-2.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v2.25A2.25 2.25 0 0 0 6 10.5Zm0 9.75h2.25A2.25 2.25 0 0 0 10.5 18v-2.25a2.25 2.25 0 0 0-2.25-2.25H6a2.25 2.25 0 0 0-2.25 2.25V18A2.25 2.25 0 0 0 6 20.25Zm9.75-9.75H18a2.25 2.25 0 0 0 2.25-2.25V6A2.25 2.25 0 0 0 18 3.75h-2.25A2.25 2.25 0 0 0 13.5 6v2.25a2.25 2.25 0 0 0 2.25 2.25Z"${_scopeId}></path></svg><label for="hyper"${_scopeId}> \u0627\u0628\u0631\u067E\u0631\u0648\u0698\u0647 </label>`);
          } else {
            return [
              (openBlock(), createBlock("svg", {
                xmlns: "http://www.w3.org/2000/svg",
                fill: "none",
                viewBox: "0 0 24 24",
                "stroke-width": "1.5",
                stroke: "currentColor",
                class: "size-5 ml-2 text-zinc-950 dark:text-white"
              }, [
                createVNode("path", {
                  "stroke-linecap": "round",
                  "stroke-linejoin": "round",
                  d: "M13.5 16.875h3.375m0 0h3.375m-3.375 0V13.5m0 3.375v3.375M6 10.5h2.25a2.25 2.25 0 0 0 2.25-2.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v2.25A2.25 2.25 0 0 0 6 10.5Zm0 9.75h2.25A2.25 2.25 0 0 0 10.5 18v-2.25a2.25 2.25 0 0 0-2.25-2.25H6a2.25 2.25 0 0 0-2.25 2.25V18A2.25 2.25 0 0 0 6 20.25Zm9.75-9.75H18a2.25 2.25 0 0 0 2.25-2.25V6A2.25 2.25 0 0 0 18 3.75h-2.25A2.25 2.25 0 0 0 13.5 6v2.25a2.25 2.25 0 0 0 2.25 2.25Z"
                })
              ])),
              createVNode("label", { for: "hyper" }, " \u0627\u0628\u0631\u067E\u0631\u0648\u0698\u0647 ")
            ];
          }
        }),
        _: 1
      }, _parent));
      _push(`<select id="states" class="bg-zinc-50 border border-zinc-300 text-zinc-900 zinctext-xs rounded-e-lg border-s-zinc-100 dark:border-s-zinc-700 border-s-2 focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-zinc-700 dark:border-zinc-600 dark:placeholder-zinc-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"><option selected${ssrRenderAttr("value", 0)}>\u0627\u0646\u062A\u062E\u0627\u0628 \u06A9\u0646\u06CC\u062F</option><!--[-->`);
      ssrRenderList(unref(hypers).data, (hyper) => {
        _push(`<option${ssrRenderAttr("value", hyper.id)}${ssrIncludeBooleanAttr(Array.isArray(unref(form).hyper) ? ssrLooseContain(unref(form).hyper, hyper.id) : ssrLooseEqual(unref(form).hyper, hyper.id)) ? " selected" : ""}>${ssrInterpolate(hyper.get_title)}</option>`);
      });
      _push(`<!--]--></select></div><div><div class="mt-4"><label for="title" class="block mb-2 font-medium text-zinc-900 dark:text-white">\u0639\u0646\u0648\u0627\u0646</label><input${ssrRenderAttr("value", unref(activity).title)} type="text" id="title" class="shadow-sm bg-zinc-50 border border-zinc-300 text-zinc-900 rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-zinc-700 dark:border-zinc-600 dark:placeholder-zinc-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 dark:shadow-sm-light" required></div><div class="mt-4"><label for="message" class="block mb-2 text-sm font-medium text-zinc-900 dark:text-white"> \u062A\u0648\u0636\u06CC\u062D\u0627\u062A \u0645\u062E\u062A\u0635\u0631 </label><textarea id="message" rows="4" class="block mb-2 p-2.5 w-full text-sm text-zinc-900 bg-zinc-50 rounded-lg border border-zinc-300 focus:ring-blue-500 focus:border-blue-500 dark:bg-zinc-700 dark:border-zinc-600 dark:placeholder-zinc-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" placeholder="">${ssrInterpolate(unref(activity).abstract)}</textarea></div>`);
      if (unref(imagePreview)) {
        _push(`<div class="flex flex-col space-y-1 mt-4"><img${ssrRenderAttr("src", unref(imagePreview))} alt="Preview" class="rounded-lg size-20 mx-auto"><button type="button" class="w-20 rounded-lg bg-yellow-300 mx-auto"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6 mx-auto p-0.5"><path stroke-linecap="round" stroke-linejoin="round" d="m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"></path></svg></button></div>`);
      } else {
        _push(`<!---->`);
      }
      _push(`<div class=""><label class="block mb-2 text-sm font-medium text-zinc-900 dark:text-white">\u0627\u0646\u062A\u062E\u0627\u0628 \u0639\u06A9\u0633</label><input type="file" accept="image/*" class="block mb-2 p-2.5 w-full text-sm text-zinc-900 bg-zinc-50 rounded-lg border border-zinc-300 focus:ring-blue-500 focus:border-blue-500 dark:bg-zinc-700 dark:border-zinc-600 dark:placeholder-zinc-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"></div><div class="flex items-start mt-4"><div class="flex items-center h-5"><input id="show" type="checkbox"${ssrIncludeBooleanAttr(Array.isArray(unref(activity).show) ? ssrLooseContain(unref(activity).show, null) : unref(activity).show) ? " checked" : ""} class="w-4 h-4 border border-zinc-300 rounded-sm bg-zinc-50 focus:ring-3 focus:ring-blue-300 dark:bg-zinc-700 dark:border-zinc-600 dark:focus:ring-blue-600 dark:ring-offset-zinc-800"></div><label for="remember" class="ms-2 text-sm font-medium text-zinc-900 dark:text-zinc-300">\u0646\u0645\u0627\u06CC\u0634 \u0639\u0645\u0648\u0645\u06CC</label></div></div><div class="mt-4"><label for="date" class="block mb-2 text-sm font-medium text-zinc-900 dark:text-white">\u0631\u0648\u0632 \u0634\u0631\u0648\u0639</label>`);
      _push(ssrRenderComponent(_component_ClientOnly, null, {}, _parent));
      _push(`</div><div class="flex mt-4"><button type="submit" class="text-white ml-2 bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg px-3 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800">\u062B\u0628\u062A \u0648 \u0628\u0631\u06AF\u0634\u062A </button><button type="button" class="text-white ml-2 bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg px-3 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800">\u062B\u0628\u062A \u0648 \u062A\u06A9\u0645\u06CC\u0644</button><button type="button" class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg px-3 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800">\u062B\u0628\u062A \u0648 \u0627\u0641\u0632\u0648\u062F\u0646 \u0628\u0639\u062F\u06CC </button></div></form></div>`);
    };
  }
};
const _sfc_setup$1 = _sfc_main$1.setup;
_sfc_main$1.setup = (props, ctx) => {
  const ssrContext = useSSRContext();
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/project/addForm.vue");
  return _sfc_setup$1 ? _sfc_setup$1(props, ctx) : void 0;
};
const _sfc_main = {};
function _sfc_ssrRender(_ctx, _push, _parent, _attrs) {
  const _component_ProjectAddForm = _sfc_main$1;
  _push(`<div${ssrRenderAttrs(_attrs)}><div>`);
  _push(ssrRenderComponent(_component_ProjectAddForm, null, null, _parent));
  _push(`</div></div>`);
}
const _sfc_setup = _sfc_main.setup;
_sfc_main.setup = (props, ctx) => {
  const ssrContext = useSSRContext();
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("pages/projects/add.client.vue");
  return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
};
const add_client = /* @__PURE__ */ _export_sfc(_sfc_main, [["ssrRender", _sfc_ssrRender]]);

export { add_client as default };
//# sourceMappingURL=add.client-Ch3iF_R3.mjs.map
