{"version":3,"sources":["/home/renatorib/p/publissue/packages/api/dist/__chunks/6BT5GCGD.cjs","../../src/publissue/createLabel.ts"],"names":["CreateLabelMutation","operation","graphql","data","Label","createLabel","props","__spreadProps","__spreadValues"],"mappings":"AAAA,sHAAkC,6CAAmC,6CAA8B,6CAA0C,ICIvIA,CAAAA,CAAsBC,4BAAAA,4BAC1BC,CAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAA,CAQP,CACH,CAAA,CAAE,OAAA,CAASC,CAAAA,EACFC,cAAAA,CAAM,MAAA,CAAOD,CAAAA,CAAK,WAAA,CAAa,KAAM,CAC7C,CAAA,CAED,MAAA,SAAsBE,CAAAA,CAEpBC,CAAAA,CAKA,CACA,OAAK,IAAA,CAAK,IAAA,CAAK,EAAA,EACb,MAAM,IAAA,CAAK,aAAA,CAAc,CAAA,CAGpB,IAAA,CAAK,OAAA,CAAQN,CAAmB,CAAA,CAAE,OAAA,CAAQ,CAC/C,KAAA,CAAOO,4BAAAA,4BAAAC,CAAA,CAAA,CACFF,CAAAA,CAAAA,CADE,CAEL,YAAA,CAAc,IAAA,CAAK,IAAA,CAAK,EAC1B,CAAA,CACF,CAAC,CACH,CAAA,cAAA","file":"/home/renatorib/p/publissue/packages/api/dist/__chunks/6BT5GCGD.cjs","sourcesContent":[null,"import { graphql, operation, CreateLabelInput } from \"../lib/graphql\";\nimport { Publissue } from \".\";\nimport { Label } from \"../types/Label\";\n\nconst CreateLabelMutation = operation(\n  graphql(`\n    mutation CreateLabel($input: CreateLabelInput!) {\n      createLabel(input: $input) {\n        label {\n          ...Label_Label\n        }\n      }\n    }\n  `),\n).withMap((data) => {\n  return Label.unmask(data.createLabel!.label!);\n});\n\nexport async function createLabel(\n  this: Publissue,\n  props: {\n    color: string;\n    description?: string;\n    name: string;\n  },\n) {\n  if (!this.repo.id) {\n    await this.getRepository();\n  }\n\n  return this.graphql(CreateLabelMutation).execute({\n    input: {\n      ...props,\n      repositoryId: this.repo.id!,\n    },\n  });\n}\n"]}