LF Simple macro help

Looking for a castsequence that gives me Prismatic Barrier 1st then arcane blast repeating,However if PB is on CD i want it to skip it and go straight to the AB.
(basically i want “target enemy 1=PB,AB~” then “target enemy 2=PB if off cooldown,AB~ if not”
Am i crazy in thinking this should be simple?

I figured it out myself by just editing a similar one. But thank you anyway!

Sequences['Arcane Barrage'] = {
-- This Sequence was exported from GSE 2.2.03.
  Author="Flashgreer",
  SpecID=62,
  Talents = "x.x.x.x.x.x.x",
  Default=1,
  MacroVersions = {
    [1] = {
      StepFunction = "Priority",
      KeyPress={
        "/targetenemy [noharm][dead]",
      },
      PreMacro={
        "/cast Prismatic Barrier",
      },
        "/cast Arcane Barrage"
      },
      KeyRelease={
        "/startattack",
      },
    },
  },
}