How to Create Independent Numbering Levels Inside a Custom Function

I created a custom function called mycontent, which formats enum so that the numbering is as follows:

#let mycontent(it) = {
  set text(size: 10pt, font: "LINE Seed Sans KR")
  set enum(
    full: true,
    numbering: (..nums) => {
      let len = nums.pos().len()
      let formats = ("I.", "a.", "(1)")
      numbering(formats.at(len - 1), nums.pos().at(-1))
    },
  )
  [#it]
}
  1. Level 1 : Numbered as I, II, III…
  2. Level 2 : Numbered as a, b, c…
  3. Level 3 : Numbered as (1), (2), (3)…

However, I ran into an issue when structuring the document like this:

+ item1  
+ item2  
    + item2_1  
    #mycontent[
         + new item1  
    ]  

In this case, new item1 is numbered as “a.” according to the external list’s current level.

What I want is for any list written inside the #mycontent function to always start numbering at the first level (I, II, III…), completely independent of the outer list’s structure or numbering context.

Could anyone guide me on how to achieve this?

If you are fine with adding a parameter to the function mycontent(), you could manually set the offset for the nested list.

#let mycontent(offset, it) = {
  set text(size: 10pt, font: "LINE Seed Sans KR")
  set enum(
    full: true,
    numbering: (..nums) => {
      let len = nums.pos().len() - offset
      let formats = ("I.", "a.", "(1)")
      numbering(formats.at(len - 1), nums.pos().at(-1))
    },
  )
  [#it]
}

+ item1
+ item2
    + item2_1
      #mycontent(2)[
        + new item1
        + new item2
          + new item3
      ]

I’ve considered various methods, but using the offset variable seems to be the most reliable.
Thank you.