{"version":3,"sources":["memberships/src/Features.vue"],"names":[],"mappings":";AAqHA;EACE,yBAAyB;AAC3B","sourcesContent":["<script>\nexport default {\n  props: ['plans', 'features', 'groups', 'colSelectClass', 'colSelectIdx'],\n  methods: {\n    findFeature(plan, feature) {\n      const _feature = plan.additionalFeatures.find(\n        (f) => f.label === feature.label\n      );\n      if (_feature)\n        return (\n          _feature.restriction ||\n          `<svg class=\"h-6 w-6\" stroke=\"currentColor\" fill=\"none\" viewBox=\"0 0 24 24\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M5 13l4 4L19 7\"></path></svg>`\n        );\n      if (plan.inherits) return this.findFeature(plan.inherits, feature);\n      return '';\n    },\n  },\n};\n</script>\n<template>\n  <table class=\"w-full text-white relative\">\n    <colgroup>\n      <col />\n      <col\n        v-for=\"i in plans.length\"\n        :class=\"`${i === colSelectIdx ? colSelectClass : ''}`\"\n      />\n    </colgroup>\n    <thead>\n      <tr>\n        <th scope=\"col\" class=\"text-3xl text-left\">\n          All our\n          <span class=\"text-primary\">features</span>\n        </th>\n        <th\n          scope=\"col\"\n          v-for=\"(plan, pIdx) in plans\"\n          :key=\"pIdx\"\n          class=\"p-4 align-text-top\"\n        >\n          <span class=\"inline-flex flex-col text-left\">\n            <span class=\"text-xl\">{{ plan.title }}</span>\n            <span class=\"font-normal\">\n              <template v-if=\"plan.price.symbol\">\n                {{ plan.price.symbol }}{{ plan.price.value }} / mo\n              </template>\n              <template v-else>{{ plan.price.value }}</template>\n            </span>\n            <component\n              v-if=\"plan.action && plan.action.label\"\n              :is=\"plan.action.url ? 'a' : 'span'\"\n              class=\"btn-primary\"\n              :href=\"plan.action.url\"\n            >\n              {{ plan.action.label }}\n            </component>\n          </span>\n        </th>\n      </tr>\n    </thead>\n    <tbody v-for=\"([, group], idx) of Object.entries(groups)\" :key=\"idx\">\n      <tr class=\"border-gray-light border-t-1\">\n        <th\n          :class=\"`text-xl text-left pt-8 pb-6 ${\n            idx % 3 === 0\n              ? 'text-orange'\n              : idx % 3 === 1\n              ? 'text-blue'\n              : 'text-green'\n          }`\"\n          v-html=\"group\"\n        ></th>\n        <td v-for=\"(plan, pIdx) in plans\" :key=\"pIdx\"></td>\n      </tr>\n      <tr\n        v-for=\"[k, feature] in Object.entries(features).filter(\n          ([k, v]) => v.group === group\n        )\"\n        :key=\"k\"\n      >\n        <th\n          scope=\"row\"\n          class=\"text-left font-normal\"\n          v-html=\"feature.label\"\n        ></th>\n        <td\n          align=\"center\"\n          class=\"p-4\"\n          v-for=\"(plan, pIdx) in plans\"\n          :key=\"pIdx\"\n          v-html=\"findFeature(plan, feature)\"\n        ></td>\n      </tr>\n    </tbody>\n    <tfoot>\n      <tr class=\"border-gray-light border-t-1\">\n        <td></td>\n        <td\n          scope=\"col\"\n          v-for=\"(plan, pIdx) in plans\"\n          :key=\"pIdx\"\n          class=\"py-8 align-text-top text-center\"\n        >\n          <component\n            v-if=\"plan.action && plan.action.label\"\n            :is=\"plan.action.url ? 'a' : 'span'\"\n            class=\"btn-primary\"\n            :href=\"plan.action.url\"\n          >\n            {{ plan.action.label }}\n          </component>\n        </td>\n      </tr>\n    </tfoot>\n  </table>\n</template>\n<style scoped>\ntable {\n  border-collapse: collapse;\n}\n</style>\n"],"sourceRoot":"/source_map/"}