{#if item} {/if} { if ( item?.file?.data?.content || item?.type === "file" || item?.content || modal ) { showModal = !showModal; } else { if (url) { if (type === "file") { if (url.startsWith("http")) { window.open(`${url}/content`, "_blank").focus(); } else { window .open( `${REXPRO_API_BASE_URL}/files/${url}/content`, "_blank", ) .focus(); } } else { window.open(`${url}`, "_blank").focus(); } } } dispatch("click"); }} > {#if !small} {#if !loading} {:else} {/if} {:else} {#if !loading} {#if type === "collection"} {:else if type === "note"} {:else if type === "chat"} {:else if type === "folder"} {:else} {/if} {:else} {/if} {/if} {#if !small} {decodeString(name)} {#if type === "file"} {$i18n.t("File")} {:else if type === "note"} {$i18n.t("Note")} {:else if type === "doc"} {$i18n.t("Document")} {:else if type === "collection"} {$i18n.t("Collection")} {:else} {type} {/if} {#if size} {formatFileSize(size)} {/if} {:else} {decodeString(name)} {#if size} {formatFileSize(size)} {:else} {type} {/if} {/if} {#if dismissible} { dispatch("dismiss"); }} > {/if}