<?php
if (!empty($comment_reply_details)) {
    foreach ($comment_reply_details as $v_reply) {
        ?>
        <div id="<?php echo $comment_type . "-reply-comment-form-container-" . $v_reply->task_comment_id ?>" class="project-inline-card ml-10 mt-4 rounded-xl border border-slate-200 bg-slate-50 p-4 dark:border-slate-700 dark:bg-slate-900/60">
            <div class="flex items-start justify-between gap-3">
                <div class="flex items-center gap-3">
                    <img alt="Avatar" src="<?php echo base_url() . $v_reply->avatar ?>" class="h-8 w-8 rounded-full border border-slate-200 object-cover dark:border-slate-700">
                    <div>
                        <a href="<?= base_url() ?>admin/user/user_details/<?= $v_reply->user_id ?>" class="text-xs font-semibold text-slate-800 hover:underline dark:text-slate-100">
                            <?= ($v_reply->fullname) ?>
                        </a>
                        <div class="text-[11px] text-slate-500 dark:text-slate-400"><?= time_ago($v_reply->comment_datetime) ?></div>
                    </div>
                </div>
                <?php if ($v_reply->user_id == $this->session->userdata('user_id')) { ?>
                    <?php echo ajax_anchor(
                        base_url("admin/common/delete_comments/" . $v_reply->task_comment_id),
                        "",
                        array(
                            "class" => "inline-flex items-center justify-center rounded-lg border border-rose-200 bg-rose-50 p-2 text-rose-600 hover:bg-rose-100 dark:border-rose-900/60 dark:bg-rose-950/30 dark:text-rose-300 dark:hover:bg-rose-900/40",
                            "title" => lang('delete'),
                            "data-fade-out-on-success" => "#" . $comment_type . "-reply-comment-form-container-" . $v_reply->task_comment_id
                        )
                    ); ?>
                <?php } ?>
            </div>
            <div class="mt-2 text-sm text-slate-700 dark:text-slate-200"><?php if (!empty($v_reply->comment)) echo $v_reply->comment; ?></div>
        </div>
    <?php }
}
?>
