import { defineComponent, resolveComponent, openBlock, createBlock, withCtx, renderSlot, createCommentVNode } from 'vue';
import script$1 from './TsImageLoader.mjs';

var script = defineComponent({
    components: {
        TsImageLoader: script$1,
    },
    props: {
        size: {
            type: String,
            default: "50",
        },
        photoUrl: {
            type: String,
            required: true,
        },
        customClass: {
            type: String,
            default: "",
        },
        bgColor: {
            type: String,
            default: "",
        },
    },
    name: "TsAvatar",
});

function render(_ctx, _cache, $props, $setup, $data, $options) {
  const _component_ts_image_loader = resolveComponent("ts-image-loader");

  return (openBlock(), createBlock(_component_ts_image_loader, {
    "photo-url": _ctx.photoUrl,
    "custom-class": `${_ctx.bgColor} rounded-full flex text-xs font-semibold flex-row items-center justify-center ${_ctx.customClass} `,
    "custom-style": `width: ${_ctx.size}px; height: ${_ctx.size}px;`
  }, {
    default: withCtx(() => [
      (_ctx.photoUrl == '')
        ? renderSlot(_ctx.$slots, "default", { key: 0 })
        : createCommentVNode("v-if", true)
    ]),
    _: 3 /* FORWARDED */
  }, 8 /* PROPS */, ["photo-url", "custom-class", "custom-style"]))
}

script.render = render;
script.__file = "src/components/TsAvatar/index.vue";

export { script as default };
