import{h as s,i as l,k as n,m as p}from"./chunk-ZDZZCKFB.js";var c=class extends p{constructor({context:a}){super(a);s(this,"context");this.context=a}getFilePropertyInfo({body:a,value:i}){var o;let t={fileFields:[],bodyPropertyFields:[]},r=(o=this.context.getRecord(i))!=null?o:{};for(let e of a.properties)switch(e.type){case"file":n.Record.missingKey(r,e.wireValue)&&(r[e.wireValue]="[bytes]"),t.fileFields.push({name:this.context.getPropertyName(e.name),value:this.getSingleFileProperty({property:e,record:r})});break;case"fileArray":n.Record.missingKey(r,e.wireValue)&&(r[e.wireValue]=["[bytes]"]),t.fileFields.push({name:this.context.getPropertyName(e.name),value:this.getArrayFileProperty({property:e,record:r})});break;case"bodyProperty":if(n.Record.missingKey(r,e.name.wireValue))switch(e.typeReference.type){case"optional":break;case"primitive":{switch(e.typeReference.value.toLowerCase()){case"integer":{r[e.name.wireValue]=123;break}case"string":{r[e.name.wireValue]="[string]";break}case"boolean":{r[e.name.wireValue]=!0;break}case"double":{r[e.name.wireValue]=123.456;break}case"float":{r[e.name.wireValue]=123.456;break}case"long":{r[e.name.wireValue]=123456789;break}case"uint":{r[e.name.wireValue]=123;break}case"uint64":{r[e.name.wireValue]=12345;break}case"date":{r[e.name.wireValue]=new Date(2021,1,1);break}case"datetime":{r[e.name.wireValue]=new Date(2021,1,1,12,0,0);break}case"uuid":{r[e.name.wireValue]="123e4567-e89b-12d3-a456-426614174000";break}case"base64":{r[e.name.wireValue]="SGVsbG8gd29ybGQh";break}case"biginteger":{r[e.name.wireValue]="12345678901234567890";break}}break}default:break}t.bodyPropertyFields.push({name:this.context.getPropertyName(e.name.name),value:this.getBodyProperty({property:e,record:r})});break;default:l(e)}return t}getSingleFileProperty({property:a,record:i}){let t=this.context.getSingleFileValue({property:a,record:i});return t==null?this.csharp.TypeLiteral.nop():this.context.getFileParameterForString(t)}getArrayFileProperty({property:a,record:i}){let t=this.context.getFileArrayValues({property:a,record:i});return t==null?this.csharp.TypeLiteral.nop():this.csharp.TypeLiteral.list({valueType:this.csharp.Type.reference(this.types.FileParameter),values:t.map(r=>this.context.getFileParameterForString(r))})}getBodyProperty({property:a,record:i}){let t=i[a.name.wireValue];return t==null?this.csharp.TypeLiteral.nop():this.context.dynamicTypeLiteralMapper.convert({typeReference:a.typeReference,value:t})}};export{c as a};
//# sourceMappingURL=chunk-MM7AFFVF.js.map