{"version":3,"file":"CardDragPreview-DOxamsuj.mjs","sources":["../../admin/src/components/DragPreviews/CardDragPreview.tsx"],"sourcesContent":["import { Flex, FlexComponent, Typography } from '@strapi/design-system';\nimport { Cross, Drag, Pencil } from '@strapi/icons';\nimport { styled } from 'styled-components';\n\ninterface CardDragPreviewProps {\n  label: string;\n  isSibling?: boolean;\n}\n\nconst CardDragPreview = ({ label, isSibling = false }: CardDragPreviewProps) => {\n  return (\n    <FieldContainer\n      background={isSibling ? 'neutral100' : 'primary100'}\n      display=\"inline-flex\"\n      gap={3}\n      hasRadius\n      justifyContent=\"space-between\"\n      $isSibling={isSibling}\n      max-height={`3.2rem`}\n      maxWidth=\"min-content\"\n    >\n      <Flex gap={3}>\n        <DragButton alignItems=\"center\" cursor=\"all-scroll\" padding={3}>\n          <Drag />\n        </DragButton>\n\n        <Typography\n          textColor={isSibling ? undefined : 'primary600'}\n          fontWeight=\"bold\"\n          ellipsis\n          maxWidth=\"7.2rem\"\n        >\n          {label}\n        </Typography>\n      </Flex>\n\n      <Flex>\n        <ActionBox alignItems=\"center\">\n          <Pencil />\n        </ActionBox>\n\n        <ActionBox alignItems=\"center\">\n          <Cross />\n        </ActionBox>\n      </Flex>\n    </FieldContainer>\n  );\n};\n\nconst ActionBox = styled<FlexComponent>(Flex)`\n  height: ${({ theme }) => theme.spaces[7]};\n\n  &:last-child {\n    padding: 0 ${({ theme }) => theme.spaces[3]};\n  }\n`;\n\nconst DragButton = styled(ActionBox)`\n  border-right: 1px solid ${({ theme }) => theme.colors.primary200};\n\n  svg {\n    width: 1.2rem;\n    height: 1.2rem;\n  }\n`;\n\nconst FieldContainer = styled<FlexComponent>(Flex)<{ $isSibling: boolean }>`\n  border: 1px solid\n    ${({ theme, $isSibling }) => ($isSibling ? theme.colors.neutral150 : theme.colors.primary200)};\n\n  svg {\n    width: 1rem;\n    height: 1rem;\n\n    path {\n      fill: ${({ theme, $isSibling }) => ($isSibling ? undefined : theme.colors.primary600)};\n    }\n  }\n`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