{"version":3,"file":"9BicRpsd.js","sources":["../../../../node_modules/@smenaspace/ui-layer/components/switch/Switch.vue"],"sourcesContent":["<script setup lang=\"ts\">\nconst model = defineModel<boolean>()\n\nconst toggleSwitch = () => (model.value = !model.value)\n</script>\n\n<template>\n  <label\n    class=\"app-switch\"\n    tabindex=\"1\"\n    @keydown.space.prevent=\"toggleSwitch\"\n    @keydown.enter.prevent=\"toggleSwitch\"\n  >\n    <input\n      v-bind=\"$attrs\"\n      v-model=\"model\"\n      class=\"app-switch__control ui-visually-hidden\"\n      type=\"checkbox\"\n      role=\"switch\"\n    />\n\n    <i class=\"app-switch__icon\" />\n  </label>\n</template>\n\n<style lang=\"scss\" scoped>\n.app-switch {\n  display: inline-block;\n  width: 56px;\n  height: 32px;\n  cursor: pointer;\n  -webkit-tap-highlight-color: transparent;\n\n  /* Стили для иконки и track */\n  &__icon {\n    position: relative;\n    display: inline-block;\n    width: 56px;\n    height: 32px;\n    vertical-align: text-bottom;\n    background-color: var(--ui-grey);\n    border-radius: 23px;\n    transition: all 0.3s linear;\n\n    &::before,\n    &::after {\n      position: absolute;\n      left: 0;\n      content: '';\n      transform: translate3d(2px, 2px, 0);\n    }\n\n    &::before {\n      width: 52px;\n      height: 28px;\n      background-color: var(--ui-grey);\n      border-radius: inherit;\n      transition: all 0.15s linear;\n      transform: translate3d(2px, 2px, 0) scale3d(1, 1, 1);\n    }\n\n    &::after {\n      width: 28px;\n      height: 28px;\n      background-color: var(--ui-white);\n      border-radius: inherit;\n      box-shadow: 0 3px 8px 0 rgba(0, 0, 0, 0.15),\n        0 3px 1px 0 rgba(0, 0, 0, 0.06);\n      transition: all 0.1s ease-in-out;\n    }\n  }\n\n  &:active &__icon::after {\n    width: 28px;\n    transform: translate3d(2px, 2px, 0);\n  }\n\n  &:focus {\n    border-radius: 100px;\n  }\n\n  &__control:checked + &__icon {\n    background-color: var(--ui-primary);\n\n    &::before {\n      transform: translate3d(18px, 2px, 0) scale3d(0, 0, 0);\n    }\n\n    &::after {\n      transform: translate3d(26px, 2px, 0);\n    }\n  }\n\n  &:active &__control:checked + &__icon::after {\n    transform: translate3d(26px, 2px, 0);\n  }\n}\n</style>\n"],"names":["model","_useModel","__props","toggleSwitch"],"mappings":";;0kBACM,MAAAA,EAAQC,EAAqBC,EAAA,YAAA,EAE7BC,EAAe,IAAOH,EAAM,MAAQ,CAACA,EAAM","debug_id":"e02573cf-d6fa-5d50-b133-227163fda45a"}