<div id="block-form-fields">
    <?= csrf_field(); ?>
    <input type="hidden" name="post_id" value="<?= $singlePost['id'] ?>">
    <input type="hidden" name="block_type" value="">
    <input type="hidden" name="block_cat" value="post">
    <input type="hidden" name="id" value=""> <!-- For editing -->

    <!-- Text -->
    <div class="block-field block-text" style="display:none;">
        <label class="form-label fw-bold">Text</label>
        <textarea name="description" class="form-control" placeholder="add your text here."></textarea>
    </div>

    <!-- Heading -->
    <div class="block-field block-heading" style="display:none;">
        <label class="form-label fw-bold">Heading</label>
        <input type="text" name="heading" class="form-control mb-2">
        <div class="row">
            <div class="col-6 mb-2">
                <select name="heading_type" class="form-select">
                    <option value="">Select ---</option>
                    <option value="h1">H1</option>
                    <option value="h2">H2</option>
                    <option value="h3">H3</option>
                    <option value="h4">H4</option>
                    <option value="h5">H5</option>
                    <option value="h6">H6</option>
                </select>
            </div>
            <div class="col-6 mb-2">
                <input type="color" name="color" class="form-control form-control-color">
            </div>
        </div>
    </div>

    <!-- Image -->
    <div class="block-field block-image" style="display:none;">
        <label class="form-label fw-bold">Image</label>
        <input type="file" name="photo" class="form-control mb-2">
        <input type="text" name="caption" class="form-control" placeholder="Caption">
    </div>

    <!-- List -->
    <div class="block-field block-list" style="display:none;">
        <label class="form-label fw-bold">List Content</label>
        <textarea name="list_content" class="form-control mb-2" placeholder="Enter each list item on separate line" row="4"></textarea>
        <select name="list_type" class="form-select">
            <option value="ul">Unordered List</option>
            <option value="ol">Ordered List</option>
        </select>
    </div>

    <!-- Card -->
    <div class="block-field block-cards" style="display:none;">
        <label class="form-label fw-bold">Card Name</label>
        <input type="text" name="card_name" class="form-control">
    </div>

    <!-- Stats -->
    <div class="block-field block-stats" style="display:none;">
        <label class="form-label fw-bold">Stats Title</label>
        <input type="text" name="stats_title" class="form-control">
    </div>

    <!-- Gallery -->
    <div class="block-field block-gallery" style="display:none;">
        <label class="form-label fw-bold">Gallery Title</label>
        <input type="text" name="gallery_title" class="form-control mb-2">

        <label for="gdes" class="form-label">Gallery Description</label>
        <textarea name="gallery_description" class="form-control" placeholder="Enter description here"></textarea>
    </div>

    <!-- Code -->
    <div class="block-field block-code" style="display:none;">
        <label class="form-label fw-bold">Code</label>
        <textarea name="code" class="form-control" placeholder="Enter code here"></textarea>
    </div>

    <!-- Advert -->
    <div class="block-field block-advert" style="display:none;">
        <label class="form-label fw-bold">Advert Code</label>
        <textarea name="advert_code" class="form-control" placeholder="Enter google Adv code here"></textarea>
    </div>
</div>
    <button type="submit" id="save-block-btn" class="btn btn-sm btn-secondary rounded-0 d-grid w-75 mt-3">Save Block</button>
