import { defineComponent, computed, mergeProps, unref, useSSRContext } from 'vue';
import { ssrRenderAttrs, ssrRenderComponent } from 'vue/server-renderer';
import { o as _export_sfc, V as VBtn } from './server.mjs';

const _sfc_main = /* @__PURE__ */ defineComponent({
  __name: "HowToArriveNav",
  __ssrInlineRender: true,
  props: {
    place: { type: Object, default: () => ({ latitude: 0, longitude: 0 }) }
  },
  setup(__props) {
    const props = __props;
    function routeBy(type) {
      const lat = props.place.latitude;
      const lon = props.place.longitude;
      const routingType = {
        foot: "engine=fossgis_osrm_foot",
        bike: "engine=fossgis_osrm_bike",
        car: "engine=fossgis_osrm_car",
        transit: null
      };
      return `https://www.openstreetmap.org/directions?from=&to=${lat},${lon}&${routingType[type]}#map=14/${lat}/${lon}`;
    }
    const geoUrl = computed(() => `geo:${props.place.latitude},${props.place.longitude}?q=${props.place.name}`);
    return (_ctx, _push, _parent, _attrs) => {
      _push(`<div${ssrRenderAttrs(mergeProps({ class: "how-to-arrive d-flex ga-n2 ma-3 rounded-xl position-absolute bottom-0" }, _attrs))} data-v-ca08f0c3>`);
      _push(ssrRenderComponent(VBtn, {
        variant: "text",
        size: "small",
        icon: "mdi-walk",
        href: routeBy("foot")
      }, null, _parent));
      _push(ssrRenderComponent(VBtn, {
        variant: "text",
        size: "small",
        icon: "mdi-bike",
        href: routeBy("bike")
      }, null, _parent));
      _push(ssrRenderComponent(VBtn, {
        variant: "text",
        size: "small",
        icon: "mdi-car",
        href: routeBy("car")
      }, null, _parent));
      _push(ssrRenderComponent(VBtn, {
        variant: "text",
        size: "small",
        icon: "mdi-open-in-new",
        href: unref(geoUrl)
      }, null, _parent));
      _push(`</div>`);
    };
  }
});
const _sfc_setup = _sfc_main.setup;
_sfc_main.setup = (props, ctx) => {
  const ssrContext = useSSRContext();
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/HowToArriveNav.vue");
  return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
};
const __nuxt_component_1 = /* @__PURE__ */ Object.assign(_export_sfc(_sfc_main, [["__scopeId", "data-v-ca08f0c3"]]), { __name: "HowToArriveNav" });

export { __nuxt_component_1 as _ };
