import { defineComponent, ref, mergeProps, unref, withCtx, createBlock, openBlock, toDisplayString, createTextVNode, useSSRContext } from "vue";
import { ssrRenderAttrs, ssrRenderComponent, ssrRenderAttr, ssrInterpolate, ssrRenderDynamicModel, ssrRenderStyle, ssrRenderClass, ssrIncludeBooleanAttr } from "vue/server-renderer";
import { _ as _sfc_main$1 } from "./AuthLayout-DIRJStxh.js";
import { useForm, Link } from "@inertiajs/vue3";
import "./useToastify-BxJet4Bm.js";
import "toastify-js";
/* empty css                  */
import "./useHexToRgb-G7J9N7Ap.js";
/* empty css             */
const _sfc_main = /* @__PURE__ */ defineComponent({
  ...{
    layout: _sfc_main$1
  },
  __name: "AccountInformation",
  __ssrInlineRender: true,
  props: {
    name: {},
    with_password: { type: Boolean },
    prev: {}
  },
  setup(__props) {
    const props = __props;
    const accountInformationForm = useForm({
      name: props.name,
      password: null,
      password_confirmation: null,
      prev: props.prev
    });
    const showPassword = ref(false);
    return (_ctx, _push, _parent, _attrs) => {
      _push(`<div${ssrRenderAttrs(mergeProps({ class: "auth-container" }, _attrs))}><div class="logo-container">`);
      _push(ssrRenderComponent(unref(Link), {
        class: "logo",
        href: _ctx.route("index")
      }, {
        default: withCtx((_, _push2, _parent2, _scopeId) => {
          if (_push2) {
            if (_ctx.$page.props.appLogo != null) {
              _push2(`<img${ssrRenderAttr("src", _ctx.$page.props.appLogo)}${ssrRenderAttr("alt", _ctx.$page.props.appFullName)}${_scopeId}>`);
            } else {
              _push2(`<span${_scopeId}>${ssrInterpolate(_ctx.$t("messages.word.logo"))}</span>`);
            }
          } else {
            return [
              _ctx.$page.props.appLogo != null ? (openBlock(), createBlock("img", {
                key: 0,
                src: _ctx.$page.props.appLogo,
                alt: _ctx.$page.props.appFullName
              }, null, 8, ["src", "alt"])) : (openBlock(), createBlock("span", { key: 1 }, toDisplayString(_ctx.$t("messages.word.logo")), 1))
            ];
          }
        }),
        _: 1
      }, _parent));
      _push(`</div><div class="card shadow-1"><div class="card-body"><div class="auth-title lts-05">${ssrInterpolate(_ctx.$t("messages.sentence.complete_account_infromation"))}</div><form class="auth-form"><div class="form-element-row mb-3"><input${ssrRenderAttr("value", unref(accountInformationForm).name)} type="text" required autocomplete="name" name="name" autofocus class="form-control"${ssrRenderAttr("placeholder", _ctx.$t("messages.word.full_name"))}>`);
      if ("name" in unref(accountInformationForm).errors) {
        _push(`<span class="form-error-msg d-flex lts-05 mt-2">${ssrInterpolate(unref(accountInformationForm).errors.name)}</span>`);
      } else {
        _push(`<!---->`);
      }
      _push(`</div>`);
      if (!_ctx.with_password) {
        _push(`<!--[--><div class="form-element-row mb-3"><div class="form-password"><input${ssrRenderDynamicModel(showPassword.value ? "text" : "password", unref(accountInformationForm).password, null)}${ssrRenderAttr("type", showPassword.value ? "text" : "password")} class="form-control"${ssrRenderAttr("placeholder", _ctx.$t("messages.word.password") + " (" + _ctx.$t("messages.word.optional") + ")")} style="${ssrRenderStyle({ "direction": "ltr", "text-align": "right" })}"><i class="${ssrRenderClass(showPassword.value ? "ri-eye-off-line" : "ri-eye-line")}"></i></div></div><div class="form-element-row mb-4"><div class="form-password"><input${ssrRenderDynamicModel(showPassword.value ? "text" : "password", unref(accountInformationForm).password_confirmation, null)}${ssrRenderAttr("type", showPassword.value ? "text" : "password")} class="form-control"${ssrRenderAttr("placeholder", _ctx.$t("messages.sentence.repeat_password"))} style="${ssrRenderStyle({ "direction": "ltr", "text-align": "right" })}"></div>`);
        if (unref(accountInformationForm).errors.password) {
          _push(`<span class="form-error-msg d-flex lts-05 mt-2">${ssrInterpolate(unref(accountInformationForm).errors.password)}</span>`);
        } else {
          _push(`<!---->`);
        }
        _push(`<span class="form-control-description lts-05">${ssrInterpolate(_ctx.$t("messages.sentence.password_hint"))}</span></div><!--]-->`);
      } else {
        _push(`<!---->`);
      }
      _push(`<div class="form-element-row mb-3"><button class="btn btn-primary" type="submit"${ssrIncludeBooleanAttr(unref(accountInformationForm).processing) ? " disabled" : ""}>${ssrInterpolate(_ctx.$t("messages.word.finish"))}</button></div><div class="form-element-row"><div class="privacy-notice lts-05">${_ctx.$t("messages.sentence.login_mean_is_accept_terms", {
        terms: `<a href='${_ctx.route("main.pages.show", "terms")}' target='_blank' class='link'> ${_ctx.$t("messages.word.terms")} </a>`
      }) ?? ""}</div></div></form></div></div><div class="auth-footer">`);
      _push(ssrRenderComponent(unref(Link), {
        href: _ctx.route("index"),
        class: "lts-05"
      }, {
        default: withCtx((_, _push2, _parent2, _scopeId) => {
          if (_push2) {
            _push2(`${ssrInterpolate(_ctx.$t("messages.sentence.home_page"))}`);
          } else {
            return [
              createTextVNode(toDisplayString(_ctx.$t("messages.sentence.home_page")), 1)
            ];
          }
        }),
        _: 1
      }, _parent));
      _push(`<span></span>`);
      _push(ssrRenderComponent(unref(Link), {
        href: _ctx.route("main.products.index"),
        class: "lts-05"
      }, {
        default: withCtx((_, _push2, _parent2, _scopeId) => {
          if (_push2) {
            _push2(`${ssrInterpolate(_ctx.$t("messages.sentence.product_archive"))}`);
          } else {
            return [
              createTextVNode(toDisplayString(_ctx.$t("messages.sentence.product_archive")), 1)
            ];
          }
        }),
        _: 1
      }, _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("resources/js/Pages/Auth/AccountInformation.vue");
  return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
};
export {
  _sfc_main as default
};
