How do I hide an unconnected repeater element if boolean field in dataset is unchecked or separate field is empty? 2 part question...

Hi I have a repeater with company offers. Each company can select up to 9 different type of offers and can also indicate if that offer can be applied to Canada. This is a 2 part question… hopefully someone can help!

Part 1 - If the offer text field is empty in the data set I need it to hide both that offer title and text. For example ( in the image below) If the Freight Deals offer is empty in the dataset I need for the title field “Freight Deals” and the paragraph underneath to collapse and whatever offer is filled in in the dataset will appear at the top of the list.

Part 2 - The second piece is that if they checked yes for Canada (boolean field in my dataset) how do I only show the flag if it’s checked.

Here is what I have so far which seems to work but doesn’t address the flag at all. I know I’d need to repeat this for each item on the list but I can’t get the first to work yet… Please help!

// For full API documentation, including code examples, visit

 // TODO: write your page related code here...
$w.onReady(() => {
  $w('#YRODataset').onReady(() => {
    $w('#YRORepeater').forEachItem(($wInRepeaterItem, itemData) => {
 if ('#freightoffer'.src) { 
 else {
 if $w('#offerFreightDealsCa') {