'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var headerText = require('./headerText-2eeecf55.js');
var paragraphText = require('./paragraphText-6f209f78.js');
var TsIcon = require('./TsIcon.js');
var normalText = require('./normalText-7b937f11.js');
var index = require('./index-146a6084.js');
var vue = require('vue');
require('./_commonjsHelpers-b3309d7b.js');
require('http');
require('https');
require('stream');
require('assert');
require('tty');
require('util');
require('os');
require('has-flag');
require('zlib');
require('form-data');

var script = {
    components: {
        TsHeaderText: headerText.script,
        TsParagraphText: paragraphText.script,
        TsIcon: TsIcon["default"],
        TsNormalText: normalText.script,
    },
    props: {
        customClass: {
            type: String,
            default: "",
        },
        files: {
            type: Object,
        },
    },
    name: "TsAttachmentList",
    setup() {
        return {
            Logic: index.Logic,
        };
    },
};

const _hoisted_1 = /*#__PURE__*/vue.createTextVNode(" Attachments ");
const _hoisted_2 = { class: "flex flex-row items-center space-x-2 flex-grow" };
const _hoisted_3 = { class: "flex flex-col mdlg:!space-y-[3px] space-y-[2px] items-start" };
const _hoisted_4 = ["href"];

function render(_ctx, _cache, $props, $setup, $data, $options) {
  const _component_ts_header_text = vue.resolveComponent("ts-header-text");
  const _component_ts_icon = vue.resolveComponent("ts-icon");
  const _component_ts_normal_text = vue.resolveComponent("ts-normal-text");
  const _component_ts_paragraph_text = vue.resolveComponent("ts-paragraph-text");

  return (vue.openBlock(), vue.createElementBlock("div", {
    class: vue.normalizeClass(`w-full flex flex-col justify-start items-start space-y-3 pt-2 mdlg:!px-5 mdlg:!py-5 py-3 px-3 border-[1px] rounded ${$props.customClass}`)
  }, [
    vue.createVNode(_component_ts_header_text, { size: 'base' }, {
      default: vue.withCtx(() => [
        _hoisted_1
      ]),
      _: 1 /* STABLE */
    }),
    ($props.files)
      ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList($props.files, (file, index) => {
          return (vue.openBlock(), vue.createElementBlock("div", {
            class: "w-full flex flex-row items-center justify-between",
            key: index
          }, [
            vue.createElementVNode("div", _hoisted_2, [
              vue.createVNode(_component_ts_icon, {
                name: "file",
                customClass: "mdlg:!h-[37px] h-[30px] "
              }),
              vue.createElementVNode("div", _hoisted_3, [
                vue.createVNode(_component_ts_normal_text, null, {
                  default: vue.withCtx(() => [
                    vue.createTextVNode(vue.toDisplayString(file.name), 1 /* TEXT */)
                  ]),
                  _: 2 /* DYNAMIC */
                }, 1024 /* DYNAMIC_SLOTS */),
                vue.createVNode(_component_ts_paragraph_text, {
                  faded: true,
                  customClass: 'text-xs'
                }, {
                  default: vue.withCtx(() => [
                    vue.createTextVNode(vue.toDisplayString($setup.Logic.common.formatBytes(file.size)), 1 /* TEXT */)
                  ]),
                  _: 2 /* DYNAMIC */
                }, 1024 /* DYNAMIC_SLOTS */)
              ])
            ]),
            vue.createElementVNode("a", {
              href: file.link,
              target: "_blank",
              class: "mdlg:!py-3 mdlg:!px-3 px-2 py-2 rounded-full border-[1px] border-gray-200"
            }, [
              vue.createVNode(_component_ts_icon, {
                name: "download",
                customClass: "mdlg:h-[17px] h-[14px]"
              })
            ], 8 /* PROPS */, _hoisted_4)
          ]))
        }), 128 /* KEYED_FRAGMENT */))
      : vue.createCommentVNode("v-if", true)
  ], 2 /* CLASS */))
}

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

exports["default"] = script;
