{"version":3,"file":"contentRelationship.cjs","names":["createFaker","prismic","capitalCase","sentenceCase"],"sources":["../../src/model/contentRelationship.ts"],"sourcesContent":["import * as prismic from \"@prismicio/client\"\n\nimport { capitalCase, sentenceCase } from \"../lib/changeCase\"\nimport { createFaker } from \"../lib/createFaker\"\nimport type { MockModelConfig } from \"../types\"\n\nexport type MockContentRelationshipModelConfig<\n\tCustomTypeIDs extends string = string,\n\tTags extends string = string,\n> = {\n\tcustomTypeIDs?: readonly CustomTypeIDs[]\n\ttags?: readonly Tags[]\n} & MockModelConfig\n\nexport const contentRelationship = <CustomTypeIDs extends string, Tags extends string>(\n\tconfig: MockContentRelationshipModelConfig<CustomTypeIDs, Tags>,\n): prismic.CustomTypeModelContentRelationshipField<CustomTypeIDs, Tags> => {\n\tconst faker = config.faker || createFaker(config.seed)\n\n\treturn {\n\t\ttype: prismic.CustomTypeModelFieldType.Link,\n\t\tconfig: {\n\t\t\tlabel: capitalCase(faker.word()),\n\t\t\tplaceholder: sentenceCase(faker.words(3)),\n\t\t\tselect: prismic.CustomTypeModelLinkSelectType.Document,\n\t\t\tcustomtypes: config.customTypeIDs,\n\t\t\ttags: config.tags,\n\t\t},\n\t}\n}\n"],"mappings":";;;;;;AAcA,MAAa,uBACZ,WAC0E;CAC1E,MAAM,QAAQ,OAAO,SAASA,oBAAAA,YAAY,OAAO,KAAK;AAEtD,QAAO;EACN,MAAMC,kBAAQ,yBAAyB;EACvC,QAAQ;GACP,OAAOC,mBAAAA,YAAY,MAAM,MAAM,CAAC;GAChC,aAAaC,mBAAAA,aAAa,MAAM,MAAM,EAAE,CAAC;GACzC,QAAQF,kBAAQ,8BAA8B;GAC9C,aAAa,OAAO;GACpB,MAAM,OAAO;GACb;EACD"}