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B,KAAKO,eAAeG,UAAUoB,GAAOC,MACtDF,EAASG,OAASH,EAASG,OAEpBH,KAGnB,G","sources":["webpack:///./Onlia/Scripts/onlia/faq/components/faq-top-questions-list.js","webpack:///./Onlia/Scripts/onlia/faq/components/faq-top-question.js"],"sourcesContent":["import axios from 'axios';\r\nimport { mapGetters } from 'vuex';\r\nimport { IS_DEV } from '@Shared/settings';\r\nimport FaqTopQuestion from './faq-top-question';\r\n\r\nexport default {\r\n name: 'faq-top-questions-list',\r\n\r\n components: {\r\n FaqTopQuestion\r\n },\r\n\r\n props: {\r\n questionsModel: Object,\r\n },\r\n\r\n data() {\r\n return {\r\n Questions: []\r\n };\r\n },\r\n\r\n computed: {\r\n ...mapGetters([\r\n 'breakpointPhone',\r\n 'breakpointTablet'\r\n ]),\r\n styles() {\r\n /**\r\n * To prevent layout shifts as the content loads, we will set an explicit height on the container,\r\n * until the content is there.\r\n */\r\n if (this.Questions.length) return '';\r\n\r\n let height = 485;\r\n if (this.breakpointPhone) {\r\n height = 735;\r\n }\r\n else if (this.breakpointTablet) {\r\n height = 685;\r\n }\r\n\r\n return { height: `${height}px` };\r\n }\r\n },\r\n\r\n async mounted() {\r\n try {\r\n await this.getQuestions();\r\n }\r\n catch (error) {\r\n (IS_DEV && console.error('mounted error:', error));\r\n }\r\n },\r\n\r\n methods: {\r\n async getQuestions() {\r\n try {\r\n const { data } = await axios.post('/api/onlia/faq/getTopAskedQuestions', this.questionsModel);\r\n\r\n this.mapResult(data);\r\n }\r\n catch (error) {\r\n (IS_DEV && console.error('getQuestions error:', error));\r\n }\r\n },\r\n\r\n mapResult(questionsData) {\r\n if (questionsData) {\r\n this.Questions = questionsData.map((question, index) => {\r\n\r\n question.Title = this.questionsModel.Questions[index].Title;\r\n question.Answer = question.Answer;\r\n\r\n return question;\r\n });\r\n }\r\n }\r\n }\r\n};\r\n","import windowSize from '@Shared/mixins/window-size';\r\n\r\nexport default {\r\n name: 'faq-top-question',\r\n mixins: [ windowSize ],\r\n props: {\r\n category: {\r\n type: String,\r\n required: true\r\n },\r\n questionText: {\r\n type: String,\r\n required: true\r\n },\r\n answerText: {\r\n type: String,\r\n required: true\r\n },\r\n classificationId: {\r\n type: Number,\r\n required: true\r\n },\r\n groupName: {\r\n type: String,\r\n required: true\r\n },\r\n subcategoryName: {\r\n type: String,\r\n required: true\r\n },\r\n questionId: {\r\n type: String,\r\n required: true\r\n }\r\n },\r\n methods: {\r\n openAnswer() {\r\n this.$eventBus.$emit('Broadcast::FAQItem', {\r\n GroupName: this.groupName,\r\n CategoryName: this.subcategoryName,\r\n QuestionId: this.questionId,\r\n animateScroll: true\r\n });\r\n }\r\n }\r\n};\r\n\r\n"],"names":["name","components","FaqTopQuestion","mixins","windowSize","props","category","type","String","required","questionText","answerText","classificationId","Number","groupName","subcategoryName","questionId","methods","openAnswer","this","$eventBus","$emit","GroupName","CategoryName","QuestionId","animateScroll","questionsModel","Object","data","Questions","computed","_objectSpread","mapGetters","styles","length","height","breakpointPhone","breakpointTablet","concat","mounted","getQuestions","error","IS_DEV","axios","post","mapResult","questionsData","map","question","index","Title","Answer"],"sourceRoot":""}