<div class="f-box my-2" data-file-init="false" data-file="<?= $file ?>">
    <input type="hidden" data-file-importer name="<?= $name.$addtype ?>" value="<?= $file ?>">

    <img class="f-icon" src="<?= get_file_icon(getcompletefilepath($file)) ?>">
    <div class="" style="flex-grow: 4">
        <div class="fs-small mb-2 ">
            <input class="form-small" type="text" name="description-<?= $name.$addtype ?>" value="<?= $description ?>" placeholder="Description">
        </div> 
        <div class="fs-small text-maj f-tools flex flex-gap-1 lh-0 align-items-center">
            <div class="pr-2">
                <?php
                $pp = pathinfo(getcompletefilepath($file));
                $extension=$pp['extension'];
                $size=human_filesize(filesize(getcompletefilepath($file)),2);
                echo $extension." - ".$size;
                ?>
            </div>
            <?php 
            if(in_array($extension,array("png","jpg","gif","webp")) && $sourceitem){
            ?>
            <div class="v-icon deletefile" title="Modifier le document" onclick="yc_imageedit('<?= $file ?>','<?= $sourceitem ?>')"><img src="app/images/pencil-fill.svg"></div>
            <?php
            }
            ?>
            <a class="v-icon deletefile" title="Télécharger le document" href="<?= getcompletefilepath($file, true) ?>" download><img src="app/images/file-download.svg"></a>
            <div class="v-icon deletefile" title="Supprimer le document" onclick="yc_file_delete('<?= $file ?>')"><img src="app/images/x-lg.svg"></div>
        </div>
    </div>
</div>